<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
require_once("options/index.php");




// 自定义关键字
function themeFields($layout) {
    $thumb = new Typecho_Widget_Helper_Form_Element_Text('thumb', NULL, NULL, _t('自定义缩略图'), _t('输入缩略图地址(仅文章有效)'));
    $layout->addItem($thumb);
}
/** 输出文章缩略图 */
function showThumbnail($widget)
{ 
    // 当文章无图片时的默认缩略图
    $dir = './usr/themes/vCards/assets/img/sj/';//随机缩略图目录
    $n=sizeof(scandir($dir))-2;
    if($n <= 0){
    $n=5;
    }// 异常处理，干掉自动判断图片数量的功能，切换至手动
    $rand = rand(1,$n); 
    // 随机 n张缩略图
 
    $random = $widget->widget('Widget_Options')->themeUrl . '/assets/img/sj/' . $rand . '.jpg'; // 随机缩略图路径
if(Typecho_Widget::widget('Widget_Options')->slimg && 'Showimg'==Typecho_Widget::widget('Widget_Options')->slimg
){
  $random = $widget->widget('Widget_Options')->themeUrl . '/assets/img/mr.png'; //无图时只显示固定一张缩略图
}

$cai = '';//这里可以添加图片后缀，例如七牛的缩略图裁剪规则，这里默认为空
    $attach = $widget->attachments(1)->attachment;
    $pattern = '/\<img.*?src\=\"(.*?)\"[^>]*>/i'; 
  $patternMD = '/\!\[.*?\]\((http(s)?:\/\/.*?(jpg|png))/i';
    $patternMDfoot = '/\[.*?\]:\s*(http(s)?:\/\/.*?(jpg|png))/i';
if (preg_match_all($pattern, $widget->content, $thumbUrl)) {
$ctu = $thumbUrl[1][0].$cai;
    }

//如果是内联式markdown格式的图片
  else   if (preg_match_all($patternMD, $widget->content, $thumbUrl)) {
$ctu = $thumbUrl[1][0].$cai;
    }
    //如果是脚注式markdown格式的图片
    else if (preg_match_all($patternMDfoot, $widget->content, $thumbUrl)) {
$ctu = $thumbUrl[1][0].$cai;
    }

 else
if ($attach && $attach->isImage) {

$ctu = $attach->url.$cai;
    } 
else 

if ($widget->tags) {
foreach ($widget->tags as $tag) {

    $ctu = './usr/themes/vCards/assets/img/tag/' . $tag['slug'] . '.jpg';

    if(is_file($ctu))
    { 
$ctu = $widget->widget('Widget_Options')->themeUrl . '/assets/img/tag/' . $tag['slug'] . '.jpg';
    }
    else
 {
       $ctu = $random;
    }
break;
}
}
else {
$ctu = $random;
}
if(Typecho_Widget::widget('Widget_Options')->slimg && 'showoff'==Typecho_Widget::widget('Widget_Options')->slimg
){
if($widget->fields->thumb){$ctu = $widget->fields->thumb;}
if($ctu== $random)
echo '';
else
if($widget->is('post')||$widget->is('page')){
echo $ctu;
}else{
echo '<img src="'
.$ctu.
'">';
}
}else{
if($widget->fields->thumb){$ctu = $widget->fields->thumb;}
  if(!$widget->is('post')&&!$widget->is('page')){
if(Typecho_Widget::widget('Widget_Options')->slimg && 'allsj'==Typecho_Widget::widget('Widget_Options')->slimg
){$ctu = $random;}
}
echo $ctu;
}
}


/**
* 获取标签数目
* 
* 语法: <?php echo tagsNum(); ?>
*/
function tagsNum($display = true)
{
$db = Typecho_Db::get();
$total_tags = $db->fetchObject($db->select(array('COUNT(mid)' => 'num'))
->from('table.metas')
->where('table.metas.type = ?', 'tag'))->num;
if($display) {
echo $total_tags;
} else {
return $total_tags;
}
}






/* 人性化评论时间 */
function timesince($older_date,$comment_date = false) {
$chunks = array(
array(86400 , '天'),
array(3600 , '小时'),
array(60 , '分'),
array(1 , '秒'),
);
$newer_date = time();
$since = abs($newer_date - $older_date);
if($since < 2592000){ for ($i=0, $j=count($chunks); $i < $j; $i++){ $seconds=$chunks[$i][0]; $name=$chunks[$i][1]; if
    (($count=floor($since / $seconds)) !=0) break; } $output=$count.$name.' 前'; }else{ $output=!$comment_date ?
    (date('Y-m-j G:i', $older_date)) : (date('Y-m-j', $older_date)); } return $output; } 
    

    

// 留言加@
function getPermalinkFromCoid($coid) {
	$db = Typecho_Db::get();
	$row = $db->fetchRow($db->select('author')->from('table.comments')->where('coid = ? AND status = ?', $coid, 'approved'));
	if (empty($row)) return '';
	return '<a href="#comment-'.$coid.'">@'.$row['author'].'</a>';
}




/* 获取浏览器信息 */
function GetBrowser($agent)
{
    if (preg_match('/MSIE\s([^\s|;]+)/i', $agent, $regs)) {
        $outputer = 'Internet Explore';
    } else if (preg_match('/FireFox\/([^\s]+)/i', $agent, $regs)) {
        $str1 = explode('Firefox/', $regs[0]);
        $FireFox_vern = explode('.', $str1[1]);
        $outputer = '<svg t="1625556812480" class="icon" viewBox="0 0 1083 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="21754" width="16" height="16"><path d="M539.008529 0.735454a511.624832 511.624832 0 1 0 511.624832 511.624832A511.624832 511.624832 0 0 0 539.008529 0.735454z" fill="#01579B" p-id="21755"></path><path d="M808.242032 426.178506a199.205734 199.205734 0 0 0-40.398555-126.553276 20.402217 20.402217 0 0 1-5.411729-10.823457c-2.705864-2.705864-2.705864-5.411729-5.411728-10.823457l-5.411729-8.117593-5.411729-8.117594a139.866128 139.866128 0 0 1-8.117593-13.529321 53.386704 53.386704 0 0 1-2.705864-56.552565c2.705864-5.411729 8.117593-10.823457 10.823457-16.235186-2.705864-2.705864-5.411729-5.411729-8.117593-5.411729h-2.705864a149.309595 149.309595 0 0 1-21.646915-16.235186l-18.941051-13.529322c-13.529322-8.117593-21.646915-10.823457-21.646914-13.529322a50.789074 50.789074 0 0 1-27.058644-51.167895 51.87142 51.87142 0 0 1 37.692691-45.783225 116.622754 116.622754 0 0 1 13.529321-2.705864l-2.705864-2.705864a498.961387 498.961387 0 0 0-156.182491-24.352779A513.573054 513.573054 0 0 0 80.662166 282.740637v13.529322c0 193.875181 169.630636 350.057671 376.981022 350.057671a378.821009 378.821009 0 0 0 350.057671-220.798531z" fill="#0277BD" p-id="21756"></path><path d="M700.575689 81.505505a84.531202 84.531202 0 0 1 24.352779-2.705864h27.058644a185.270532 185.270532 0 0 1 35.013885 5.411728 236.952541 236.952541 0 0 1 40.398554 13.529322 174.14943 174.14943 0 0 1 43.077361 24.352779 424.550117 424.550117 0 0 1 40.398555 32.308021 251.455974 251.455974 0 0 1 35.013884 40.398554c8.117593 16.235186 18.94105 29.629215 27.058644 45.783225a359.879959 359.879959 0 0 1 18.94105 48.462031 366.996382 366.996382 0 0 1 10.823458 45.783225 232.460807 232.460807 0 0 1 2.705864 40.398554v18.941051a34.148008 34.148008 0 0 1-2.705864 16.235186c0 10.823457-2.705864 18.94105-2.705864 27.058644a74.546563 74.546563 0 0 1-2.705865 21.646914 128.393264 128.393264 0 0 1-10.823457-21.646914 105.52871 105.52871 0 0 1-10.823458-24.35278 262.171197 262.171197 0 0 0-13.529321-29.629214c-5.411729-10.823457-10.823457-21.646915-16.235187-35.013885-5.411729-10.823457-13.529322-24.352779-18.94105-37.69269a269.152327 269.152327 0 0 0-21.646915-37.692691 393.892674 393.892674 0 0 0-24.352779-35.013885 156.128373 156.128373 0 0 0-27.058644-32.30802 307.359132 307.359132 0 0 0-29.629214-29.629215 141.164943 141.164943 0 0 0-29.629215-27.058643 205.645691 205.645691 0 0 0-29.629215-21.646915 163.461266 163.461266 0 0 0-27.058643-18.941051 248.479524 248.479524 0 0 0-21.646915-13.529321 119.382735 119.382735 0 0 0-15.721072-13.448146z" fill="#FFF176" p-id="21757"></path><path d="M1053.312166 340.104961a347.676511 347.676511 0 0 0-59.23137-150.79782 311.174401 311.174401 0 0 0-35.013885-40.398555 164.868315 164.868315 0 0 1-16.235186-13.529322 122.034482 122.034482 0 0 0 2.705864 21.646915c2.705864 13.529322 2.705864 29.629215 5.411729 51.167895 2.705864 10.823457 2.705864 21.646915 5.411728 32.30802a196.932808 196.932808 0 0 0-37.69269-43.07736 203.940996 203.940996 0 0 0-37.69269-27.058644c-13.529322-5.411729-18.94105-8.117593-18.941051-8.117593a86.885304 86.885304 0 0 1 5.411729 16.235186c2.705864 10.823457 8.117593 24.352779 13.529322 43.077361s13.529322 43.077361 21.646914 67.321905a252.457144 252.457144 0 0 0-48.46203-45.783225 179.12822 179.12822 0 0 0-48.462031-21.646915 87.101774 87.101774 0 0 0-24.352779-5.411728 66.672498 66.672498 0 0 1 10.823458 16.235186 117.055692 117.055692 0 0 1 10.823457 18.94105c5.411729 8.117593 8.117593 16.235186 13.529322 24.352779a563.631545 563.631545 0 0 1 27.058643 56.552565c5.411729 10.823457 8.117593 21.646915 13.529322 32.308021 2.705864 10.823457 10.823457 21.646915 13.529322 35.013884 5.411729 10.823457 8.117593 21.646915 13.529322 35.013885 2.705864 10.823457 8.117593 21.646915 10.823457 35.013885 2.705864 10.823457 8.117593 21.646915 10.823457 32.30802a96.437006 96.437006 0 0 0 10.823458 29.629215c8.117593 18.94105 13.529322 35.013885 18.94105 45.783225l8.117593 16.235186s2.705864-5.411729 8.117593-18.941051a50.707898 50.707898 0 0 0 5.411729-21.646914 96.761709 96.761709 0 0 0 5.411729-29.629215c0-8.117593 2.705864-16.235186 2.705864-24.352779a113.240423 113.240423 0 0 0 5.411729 13.529321l8.117593-16.235186a131.288538 131.288538 0 0 0 8.117593-18.94105v-2.705864a45.810284 45.810284 0 0 0 2.705864 18.94105c0 10.823457 2.705864 18.94105 2.705865 27.058644v24.352779a74.546563 74.546563 0 0 0 2.705864 21.646915 164.76008 164.76008 0 0 0 13.529322-16.235187c2.705864-5.411729 8.117593-10.823457 13.529322-18.94105a250.157159 250.157159 0 0 0 13.529321-27.058644 133.344995 133.344995 0 0 0 10.823458-35.013884l8.117593-40.398555a231.703165 231.703165 0 0 0 2.705864-43.077361 127.500328 127.500328 0 0 0-2.705864-45.783224z" fill="#FDD835" p-id="21758"></path><path d="M1080.235517 399.255156a74.546563 74.546563 0 0 0-2.705865-21.646915s-5.411729 8.117593-13.529322 18.941051c-8.117593 13.529322-16.235186 29.629215-27.058643 51.167894-8.117593 18.94105-18.94105 40.398555-29.629215 61.937235a417.027814 417.027814 0 0 0-2.705864-59.23137c-2.705864-16.235186-5.411729-29.629215-8.117593-43.077361-5.411729-13.529322-8.117593-27.058644-13.529322-37.69269a248.181878 248.181878 0 0 0-27.058643-53.846701 106.556938 106.556938 0 0 0-13.529322-18.94105s-2.705864 32.30802-2.705865 80.770051c0 24.352779-2.705864 48.462031-5.411728 78.091245 0 13.529322-2.705864 27.058644-2.705865 43.07736a235.734902 235.734902 0 0 1-5.411728 43.077361v10.823457a152.80016 152.80016 0 0 0-21.646915-64.61604 130.097958 130.097958 0 0 0-27.058644-40.398555 63.154874 63.154874 0 0 0-16.235186-16.235186v18.94105a311.417928 311.417928 0 0 1-2.705864 45.783225c-2.705864 35.013885-8.117593 80.770051-13.529322 123.87447a7904450.176344 7904450.176344 0 0 1-10.823457 64.616041c-2.705864 10.823457-5.411729 21.646915-8.117593 29.629215a118.462741 118.462741 0 0 0-5.411729 27.058643c-2.705864 8.117593-2.705864 18.94105-5.411729 24.352779-2.705864 8.117593-2.705864 13.529322-5.411729 21.646915a121.953306 121.953306 0 0 0-2.705864 21.646915 123.008593 123.008593 0 0 0 16.235186-10.823458 186.082292 186.082292 0 0 0 37.692691-32.30802c5.411729-8.117593 13.529322-16.235186 21.646915-27.058643 5.411729-10.823457 13.529322-18.94105 18.94105-29.629215 0 8.117593-2.705864 16.235186-2.705864 24.352779-2.705864 8.117593-2.705864 18.94105-5.411729 24.352779a87.074715 87.074715 0 0 0-5.411729 24.352779c2.705864-2.705864 10.823457 0 18.941051 2.705865a9.389349 9.389349 0 0 1-2.705865 5.411728l-8.117593 24.35278c-5.411729 13.529322-8.117593 21.646915-8.117593 21.646914a74.546563 74.546563 0 0 0 18.941051-10.823457c5.411729-5.411729 13.529322-8.117593 21.646915-16.235186a102.822845 102.822845 0 0 0 24.352779-24.352779c8.117593-8.117593 16.235186-18.94105 27.058643-29.629215 8.117593-10.823457 16.235186-24.352779 24.352779-37.69269a502.641362 502.641362 0 0 0 40.398555-86.154721 588.606673 588.606673 0 0 0 27.058644-91.539391c5.411729-29.629215 8.117593-56.552565 10.823457-80.770051a380.282176 380.282176 0 0 0-2.705864-59.231371z" fill="#FFB300" p-id="21759"></path><path d="M1007.556 684.669728c-10.823457 5.411729-21.646915 16.235186-37.69269 27.058643a681.01194 681.01194 0 0 0-70.000711 61.937235c2.705864-8.117593 8.117593-16.235186 10.823457-24.352779a346.972986 346.972986 0 0 0 13.529322-64.616041 218.579722 218.579722 0 0 0-2.705864-45.783224 84.152381 84.152381 0 0 0-5.411729-18.941051 97.194648 97.194648 0 0 0-10.823458 13.529322c-5.411729 8.117593-16.235186 21.646915-27.058643 35.013885s-21.646915 32.30802-32.30802 48.46203c-2.705864 2.705864-2.705864 5.411729-5.411729 8.117593a165.707133 165.707133 0 0 0 5.411729-51.167895 193.604594 193.604594 0 0 0-10.823458-59.23137 161.918923 161.918923 0 0 0-18.94105-37.692691 50.247901 50.247901 0 0 0-8.117593-10.823457 86.831187 86.831187 0 0 0-5.411729 16.235186c-2.705864 8.117593-8.117593 21.646915-13.529322 37.69269-5.411729 13.529322-8.117593 29.629215-13.529322 48.462031-2.705864 8.117593-5.411729 16.235186-8.117593 27.058643a185.487001 185.487001 0 0 1-8.117593 21.646915 245.936011 245.936011 0 0 1-172.3365 67.321905 307.467366 307.467366 0 0 1-88.860586-13.529321 315.909663 315.909663 0 0 1-113.10513-70.000711 266.257052 266.257052 0 0 0 140.028481-24.352779l67.321905-43.077361a37.367987 37.367987 0 0 1 24.352779 0c16.235186-2.705864 21.646915-10.823457 16.235186-27.058643a127.527387 127.527387 0 0 0-35.013885-29.629215 98.845225 98.845225 0 0 0-107.72046 8.117593 99.73816 99.73816 0 0 1-102.335789-2.705864c-83.475915-43.077361-51.167895-153.476626 37.69269-96.95112a130.097958 130.097958 0 0 0-18.941051-86.154721 220.176182 220.176182 0 0 1 40.398555-277.351096 246.396008 246.396008 0 0 0-145.41315 70.00071C24.271953 159.59675 0.027408 428.857312 0.027408 431.563176l32.308021-29.629214a349.300029 349.300029 0 0 0-21.646915 91.539391 455.153443 455.153443 0 0 0 88.860585 309.659116 575.158527 575.158527 0 0 0 439.45943 220.717356c183.105841 0 301.595641-67.321905 379.686886-153.476627l16.235186-16.235186a495.335529 495.335529 0 0 0 45.783225-59.23137 304.220329 304.220329 0 0 0 29.629214-59.231371c5.411729-18.94105 10.823457-35.013885 13.529322-45.783225v-16.235186a123.170945 123.170945 0 0 0-16.235186 10.823457z" fill="#FF9800" p-id="21760"></path><path d="M215.874208 620.053687c-5.411729-188.490511 115.783936-172.336501 177.72117-150.79782-43.077361-8.117593-61.937235 32.30802-43.07736 70.000711a136.64615 136.64615 0 0 0-134.64381 80.77005z m169.630636 78.091245a266.284111 266.284111 0 0 0 140.02848-24.352779l67.321905-43.07736a22.999847 22.999847 0 0 1 18.941051 0c-78.091245-45.783225-161.567161 51.167895-344.673002 21.646914a301.108585 301.108585 0 0 0 118.4898 45.783225z m-5.411729-441.597062a236.059606 236.059606 0 0 0 29.629215 140.02848c37.69269-21.646915 75.385381-45.783225 75.385381-45.783225s53.846701-53.846701 0-53.8467a146.766083 146.766083 0 0 1-105.014596-40.398555z m-210.029191-56.552565a168.872994 168.872994 0 0 1-61.937235-118.4898S43.510648 186.5201 67.728134 269.996016a239.090174 239.090174 0 0 1 102.33579-70.000711z" fill="#EF6C00" p-id="21761"></path><path d="M409.749388 396.57635c37.69269-21.646915 75.385381-45.783225 75.385381-45.783225l10.823458-10.823457-10.823458-16.235186H382.79898a265.715879 265.715879 0 0 0 27.058643 72.706575z" fill="#FFCC80" p-id="21762"></path><path d="M485.161828 296.946425a74.546563 74.546563 0 0 1-24.352779-2.705865l-2.705865 2.705865a315.990839 315.990839 0 0 1 27.058644 53.8467s53.846701-53.846701 0-53.8467z" fill="#5D4037" p-id="21763"></path></svg>';
    } else if (preg_match('/Maxthon([\d]*)\/([^\s]+)/i', $agent, $regs)) {
        $str1 = explode('Maxthon/', $agent);
        $Maxthon_vern = explode('.', $str1[1]);
        $outputer = '<svg t="1625556095875" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2438" width="16" height="16"><path d="M923.69886 761.758375a328.212997 328.212997 0 0 1-41.986312 18.793873 408.90669 408.90669 0 0 1-143.553199 25.991526c-189.138338 0-353.884628-129.957632-353.884629-297.10314a125.479092 125.479092 0 0 1 65.578621-109.16441c-171.144204 7.197653-215.129864 185.539511-215.129865 289.905486 0 295.503661 272.311222 325.493884 331.092059 325.493884 31.589701 0 79.174188-9.197002 107.964802-18.394003l5.198305-1.599479a511.833134 511.833134 0 0 0 266.313178-211.131168 15.994785 15.994785 0 0 0-4.798436-21.99283 16.834512 16.834512 0 0 0-16.794524-0.799739z" fill="#0F5197" p-id="2439"></path><path d="M422.662206 965.29202A317.816387 317.816387 0 0 1 331.891798 880.119787a322.734783 322.734783 0 0 1 117.961543-479.843563 132.47681 132.47681 0 0 1 61.979793-15.994786 130.317514 130.317514 0 0 1 102.766497 51.983053 128.79801 128.79801 0 0 1 25.591657 74.775622c0-0.799739 97.968061-318.29623-319.895709-318.296231-175.54277 0-319.895709 166.745638-319.895709 312.698056a521.50998 521.50998 0 0 0 48.384226 223.926996 512.113043 512.113043 0 0 0 625.396111 268.312526 303.02121 303.02121 0 0 1-251.518001-32.38944z" fill="#0C88DA" p-id="2440"></path><path d="M609.001456 595.412606c-3.198957 3.998696-13.195698 9.996741-13.195698 22.792569 0 10.396611 6.797784 20.393351 18.793873 28.790614 57.581228 39.986964 165.945899 34.788658 166.345769 34.788659a238.922108 238.922108 0 0 0 121.160499-33.18918 245.120087 245.120087 0 0 0 121.56037-211.531038c1.199609-89.570799-31.989571-149.151374-45.185269-175.54277a440.496391 440.496391 0 0 0-83.732702-113.842886 493.639066 493.639066 0 0 0-142.673486-97.088347A582.530086 582.530086 0 0 0 511.833134 0.006718 511.833134 511.833134 0 0 0 0 504.642199c1.999348-145.952417 147.152026-263.91396 319.895709-263.91396 13.995437 0 93.969365 1.199609 167.945247 40.386833 65.178751 34.388789 99.567539 75.575361 123.159848 116.761934 24.791917 42.786051 29.190483 96.368582 29.190484 117.961543s-10.79648 53.182662-31.189832 79.574057z" fill="#2CC3D5" p-id="2441"></path><path d="M649.548237 15.12179s372.638514 385.154434-48.544174 593.246592c0 0-27.231122 45.225256 102.846471 68.61763 0 0 215.489747 46.824734 302.461393-142.513538 17.51429-59.380641 33.109206-151.390644-13.195698-253.797259a427.860511 427.860511 0 0 0-76.974905-113.682937 546.381871 546.381871 0 0 0-113.083134-94.68913c-68.457682-34.988593-153.509953-57.181358-153.509953-57.181358z" fill="#49D668" p-id="2442"></path></svg>';
    } else if (preg_match('#360([a-zA-Z0-9.]+)#i', $agent, $regs)) {
        $outputer = '<svg t="1625556152797" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3610" width="16" height="16"><path d="M958.243794 134.515041c-33.297993-16.108997-68.409985-23.742995-104.462977-27.596994-7.919998-0.848-16.009997-0.125-26.530995-0.125C953.435795 211.250025 1021.193781 342.949996 1023.91878 504.399962c2.309 136.699971-44.82799 256.317945-138.02197 357.238923-177.469962 192.192959-497.772893 229.086951-722.416845 27.258994-5.770999 37.257992-4.730999 73.755984 1.462 113.103976-18.231996-21.497995-31.419993-42.770991-41.205992-66.060986-15.577997-37.073992-25.185995-75.681984-29.597993-115.696975-0.89-8.070998-4.037999-16.652996-8.506998-23.450995C43.399991 732.556913 16.123997 662.583928 5.203999 586.611944-2.28 534.559955-1.739 482.497966 7.129998 430.332978 33.728993 273.888011 115.791975 154.959037 250.296946 72.230054 319.630931 29.587064 395.920915 6.753069 477.443897 1.22907c88.359981-5.984999 172.372963 9.917998 252.704946 46.80599 6.814999 3.128999 14.998997 4.559999 22.555995 4.591999 52.393989 0.228 102.591978 10.740998 150.656968 31.282993 24.038995 10.274998 41.771991 27.932994 54.881988 50.604989zM180.792961 781.436902c-3.433999 17.475996-7.026998 32.889993-9.199998 48.50299-0.683 4.908999 0.777 12.017997 4.071999 15.295996 61.883987 61.524987 135.299971 103.453978 220.129953 123.895974 76.619984 18.463996 153.678967 18.312996 230.25395-1.711 100.157978-26.190994 182.978961-79.630983 248.536947-159.444966 40.957991-49.865989 70.279985-105.918977 88.242981-168.099963 12.739997-44.103991 18.592996-89.030981 18.377996-134.598972-0.22-46.30099-7.565998-91.68798-21.678995-136.08597-33.556993-105.557977-96.712979-188.761959-188.10996-250.794946-4.950999-3.361999-13.241997-3.905999-19.514996-2.896-47.90599 7.693998-89.098981 31.619993-130.722971 54.622988-44.29299 24.473995-83.405982 56.001988-122.549974 87.588982-4.354999 3.518999-9.854998 7.211998-15.139997 7.752998-67.969985 6.948999-122.041974 38.125992-161.963965 93.06298-10.903998 15.007997-18.645996 32.304993-28.158994 49.116989h427.645908c-34.549993-82.874982-93.39098-130.500972-183.70596-142.490969 4.276999-3.228999 6.070999-4.613999 7.896998-5.954999 25.749994-18.913996 50.853989-38.793992 77.437983-56.460988 26.873994-17.855996 55.127988-33.666993 82.978982-50.026989 6.406999-3.761999 13.094997-5.467999 20.840996-0.866 69.470985 41.286991 120.347974 98.898979 153.478967 172.403963 24.373995 54.073988 37.159992 111.028976 41.243991 169.886964 1.629 23.461995 0.268 47.13199 0.268 73.597984h-634.929864c3.948999 42.049991 18.216996 76.924983 43.413991 106.672977 46.40999 54.796988 108.737977 74.976984 177.937962 75.699984 71.844985 0.752 134.709971-24.909995 188.666959-72.035985 5.144999-4.492999 8.566998-4.545999 14.249997-1.840999 34.714993 16.537996 69.625985 32.660993 104.439978 48.984989 17.450996 8.181998 34.842993 16.491996 53.144988 25.167995-2.442999 4.270999-4.044999 7.770998-6.254998 10.827997C811.903826 830.676892 746.92984 880.571881 664.102857 904.299876c-82.870982 23.740995-167.078964 27.865994-252.054946 10.309998-79.832983-16.492996-150.208968-50.590989-208.197955-108.562977-7.383998-7.379998-14.295997-15.230997-23.056995-24.609995z m-87.810981-49.318989c0.832-5.613999 1.122-8.588998 1.727-11.498998 6.152999-29.608994 8.132998-60.922987 19.323996-88.502981 36.757992-90.593981 92.64298-169.870964 154.318966-245.197947 12.180997-14.875997 24.343995-29.764994 36.514993-44.648991-30.651993 19.560996-59.524987 41.062991-82.791983 68.834986-23.008995 27.466994-46.26299 54.883988-67.082985 83.980982-20.904996 29.215994-38.938992 60.482987-58.249988 90.88098-0.605-3.359999-1.512-7.740998-2.175999-12.158997-8.649998-57.640988-6.414999-114.667975 7.420998-171.487963 42.967991-176.449962 202.431957-305.399934 384.595917-310.356934 16.283997-0.443 32.947993 0.791 48.76199-2.256999 30.559993-5.888999 60.610987-14.372997 90.92898-21.558996 8.871998-2.106 17.921996-3.453999 29.364994-5.614998C491.981894 5.529069 277.05394 47.67006 142.335969 213.100024 4.756999 382.047988 15.995997 599.434941 92.98198 732.117913z" p-id="3611" fill="#27bd4b"></path></svg>';
    } else if (preg_match('/Edge([\d]*)\/([^\s]+)/i', $agent, $regs)) {
        $str1 = explode('Edge/', $regs[0]);
        $Edge_vern = explode('.', $str1[1]);
        $outputer = '<svg t="1625556095875" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2438" width="16" height="16"><path d="M923.69886 761.758375a328.212997 328.212997 0 0 1-41.986312 18.793873 408.90669 408.90669 0 0 1-143.553199 25.991526c-189.138338 0-353.884628-129.957632-353.884629-297.10314a125.479092 125.479092 0 0 1 65.578621-109.16441c-171.144204 7.197653-215.129864 185.539511-215.129865 289.905486 0 295.503661 272.311222 325.493884 331.092059 325.493884 31.589701 0 79.174188-9.197002 107.964802-18.394003l5.198305-1.599479a511.833134 511.833134 0 0 0 266.313178-211.131168 15.994785 15.994785 0 0 0-4.798436-21.99283 16.834512 16.834512 0 0 0-16.794524-0.799739z" fill="#0F5197" p-id="2439"></path><path d="M422.662206 965.29202A317.816387 317.816387 0 0 1 331.891798 880.119787a322.734783 322.734783 0 0 1 117.961543-479.843563 132.47681 132.47681 0 0 1 61.979793-15.994786 130.317514 130.317514 0 0 1 102.766497 51.983053 128.79801 128.79801 0 0 1 25.591657 74.775622c0-0.799739 97.968061-318.29623-319.895709-318.296231-175.54277 0-319.895709 166.745638-319.895709 312.698056a521.50998 521.50998 0 0 0 48.384226 223.926996 512.113043 512.113043 0 0 0 625.396111 268.312526 303.02121 303.02121 0 0 1-251.518001-32.38944z" fill="#0C88DA" p-id="2440"></path><path d="M609.001456 595.412606c-3.198957 3.998696-13.195698 9.996741-13.195698 22.792569 0 10.396611 6.797784 20.393351 18.793873 28.790614 57.581228 39.986964 165.945899 34.788658 166.345769 34.788659a238.922108 238.922108 0 0 0 121.160499-33.18918 245.120087 245.120087 0 0 0 121.56037-211.531038c1.199609-89.570799-31.989571-149.151374-45.185269-175.54277a440.496391 440.496391 0 0 0-83.732702-113.842886 493.639066 493.639066 0 0 0-142.673486-97.088347A582.530086 582.530086 0 0 0 511.833134 0.006718 511.833134 511.833134 0 0 0 0 504.642199c1.999348-145.952417 147.152026-263.91396 319.895709-263.91396 13.995437 0 93.969365 1.199609 167.945247 40.386833 65.178751 34.388789 99.567539 75.575361 123.159848 116.761934 24.791917 42.786051 29.190483 96.368582 29.190484 117.961543s-10.79648 53.182662-31.189832 79.574057z" fill="#2CC3D5" p-id="2441"></path><path d="M649.548237 15.12179s372.638514 385.154434-48.544174 593.246592c0 0-27.231122 45.225256 102.846471 68.61763 0 0 215.489747 46.824734 302.461393-142.513538 17.51429-59.380641 33.109206-151.390644-13.195698-253.797259a427.860511 427.860511 0 0 0-76.974905-113.682937 546.381871 546.381871 0 0 0-113.083134-94.68913c-68.457682-34.988593-153.509953-57.181358-153.509953-57.181358z" fill="#49D668" p-id="2442"></path></svg>';
    } else if (preg_match('/UC/i', $agent)) {
        $str1 = explode('rowser/',  $agent);
        $UCBrowser_vern = explode('.', $str1[1]);
        $outputer = '<svg t="1625554812627" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="18266" width="16" height="16"><path d="M274.280342 654.005224c9.69685-50.631144 37.479613-89.838098 78.277808-119.7872 24.891923-18.273179 51.358715-34.419927 77.313853-51.221592 41.430598-26.816762 76.131935-59.491952 93.820805-107.012246 19.757996-53.076846 18.346857-104.753809-17.61417-150.34517-45.558615-57.763588-107.086947-75.44018-178.190355-62.706157-51.713802 9.265014-94.065376 36.024471-130.726344 72.526827-15.237029 15.172561-28.224832 32.16763-38.193881 53.68776 3.436262-2.326998 5.288446-3.546779 7.104815-4.814656 19.720134-13.749142 41.452087-20.349467 65.608254-19.402909 40.377616 1.577938 73.809029 35.942607 74.717725 76.282361 0.600681 26.546609-7.622608 50.202379-23.496134 70.628594-20.225647 26.028816-42.022069 50.841945-63.272046 76.06542-45.746904 54.301743-69.424162 116.076692-59.873646 187.533141 9.601682 71.829955 47.079248 126.060067 110.722754 160.828942 40.101323 21.906939 84.121909 29.192879 131.572618 28.729322-2.565429-1.067308-3.574409-1.6158-4.650927-1.913583C306.245358 837.991586 258.034333 738.816842 274.280342 654.005224z" p-id="18267" fill="#f44808"></path><path d="M635.544269 478.401788c36.902468 12.149714 70.174246 31.611975 103.969956 50.177819 35.504632 19.507286 72.874751 20.302395 111.1331 9.019421 7.475252-2.204202 10.504238-6.281053 9.79304-14.048971-0.939395-10.228969-0.403183-20.640086-1.924839-30.758538-10.134825-67.343781-46.508243-113.77323-111.137193-136.75157-8.093329-2.877537-10.689457-7.361665-13.099343-15.040555-4.628414-14.756075-10.866489-29.082362-17.427928-43.12417-2.700505-5.77554-7.957229-10.355859-13.009292-16.677844-4.817726 7.206122-8.905834 12.56927-12.20088 18.387789-12.351306 21.800515-16.32685 45.835931-17.216103 70.381977-0.272199 7.540743-2.243087 13.130042-8.242731 17.286712-13.294794 9.212826-25.922393 19.730367-40.148395 27.185152-30.444383 15.95232-61.732993 30.297027-91.821265 44.88835C568.329425 459.151351 602.155834 467.410456 635.544269 478.401788z" p-id="18268" fill="#f44808"></path><path d="M673.563164 811.088866c-12.976546-3.01159-26.302039-4.510734-40.022529-6.780427 0.694825-2.615571 1.196245-4.867868 1.888-7.060813 10.070356-31.897478 11.874445-64.206324 7.691169-97.453542-13.919011-110.61019-125.914758-176.923502-215.691457-157.747767-47.78226 10.205433-81.620949 36.890188-101.228519 81.56876 71.884191-71.190389 179.466418-49.432853 223.887117 12.062733 29.315676 40.581254 37.269835 85.23322 22.286586 133.007293-15.030321 47.921429-49.582255 77.453023-97.616248 95.934956 61.796438 1.750877 233.275951-3.621481 254.119675-10.259668-2.342348-4.469801-4.089132-9.146311-6.938016-13.010315C709.838346 824.957735 692.984493 815.59346 673.563164 811.088866z" p-id="18269" fill="#f44808"></path><path d="M534.685163 725.447347c-0.433882-56.465013-42.902112-102.863762-102.437044-103.161544-64.24214-0.324388-103.433744 52.433186-103.439884 102.995769-0.00614 54.04387 44.74918 103.402021 102.848413 102.490256C488.697783 827.724755 535.121092 782.037203 534.685163 725.447347zM431.128623 772.184811c-26.053376-0.092098-46.77328-21.143553-46.654576-47.393403 0.113587-25.645077 22.200628-47.642067 47.403636-47.214325 25.605168 0.431835 47.329958 22.166859 47.504944 47.521317C479.561705 751.020792 457.772446 772.282025 431.128623 772.184811z" p-id="18270" fill="#f44808"></path><path d="M863.073332 624.677269c-5.123694-20.192901-19.295462-31.397081-38.401612-36.170804-13.314237-3.325745-27.16878-4.612041-40.83708-6.376221-37.299511-4.811586-70.12615-20.315698-101.579513-40.246633-63.176878-40.032762-132.093481-57.691957-206.838835-48.972365-12.923334 1.50733-25.443485 6.463202-38.149878 9.827833 0.225127 0.895393 0.448208 1.786693 0.671289 2.681062 8.211009 0 16.518209-0.797156 24.616654 0.158612 19.765159 2.331092 40.018436 3.377934 59.039651 8.670473 67.429739 18.757203 115.761514 62.206784 150.210094 121.894188 4.919033 8.525164 10.476609 14.224979 19.98824 14.746866 13.645788 0.74599 27.538193 2.113127 40.957831 0.376577 11.717879-1.51654 23.611767-5.593392 34.234709-10.9197 30.68793-15.395642 61.841463-22.267143 95.451956-9.4093 0.747014-1.765203 1.174756-2.301416 1.152243-2.819209C863.542007 626.968451 863.355765 625.800859 863.073332 624.677269z" p-id="18271" fill="#f44808"></path></svg>';
    } else if (preg_match('/QQ/i', $agent, $regs) || preg_match('/QQ Browser\/([^\s]+)/i', $agent, $regs)) {
        $str1 = explode('rowser/',  $agent);
        $QQ_vern = explode('.', $str1[1]);
        $outputer = 'QQ Browser';
    } else if (preg_match('/UBrowser/i', $agent, $regs)) {
        $str1 = explode('rowser/',  $agent);
        $UCBrowser_vern = explode('.', $str1[1]);
        $outputer = '<svg t="1625554812627" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="18266" width="16" height="16"><path d="M274.280342 654.005224c9.69685-50.631144 37.479613-89.838098 78.277808-119.7872 24.891923-18.273179 51.358715-34.419927 77.313853-51.221592 41.430598-26.816762 76.131935-59.491952 93.820805-107.012246 19.757996-53.076846 18.346857-104.753809-17.61417-150.34517-45.558615-57.763588-107.086947-75.44018-178.190355-62.706157-51.713802 9.265014-94.065376 36.024471-130.726344 72.526827-15.237029 15.172561-28.224832 32.16763-38.193881 53.68776 3.436262-2.326998 5.288446-3.546779 7.104815-4.814656 19.720134-13.749142 41.452087-20.349467 65.608254-19.402909 40.377616 1.577938 73.809029 35.942607 74.717725 76.282361 0.600681 26.546609-7.622608 50.202379-23.496134 70.628594-20.225647 26.028816-42.022069 50.841945-63.272046 76.06542-45.746904 54.301743-69.424162 116.076692-59.873646 187.533141 9.601682 71.829955 47.079248 126.060067 110.722754 160.828942 40.101323 21.906939 84.121909 29.192879 131.572618 28.729322-2.565429-1.067308-3.574409-1.6158-4.650927-1.913583C306.245358 837.991586 258.034333 738.816842 274.280342 654.005224z" p-id="18267" fill="#f44808"></path><path d="M635.544269 478.401788c36.902468 12.149714 70.174246 31.611975 103.969956 50.177819 35.504632 19.507286 72.874751 20.302395 111.1331 9.019421 7.475252-2.204202 10.504238-6.281053 9.79304-14.048971-0.939395-10.228969-0.403183-20.640086-1.924839-30.758538-10.134825-67.343781-46.508243-113.77323-111.137193-136.75157-8.093329-2.877537-10.689457-7.361665-13.099343-15.040555-4.628414-14.756075-10.866489-29.082362-17.427928-43.12417-2.700505-5.77554-7.957229-10.355859-13.009292-16.677844-4.817726 7.206122-8.905834 12.56927-12.20088 18.387789-12.351306 21.800515-16.32685 45.835931-17.216103 70.381977-0.272199 7.540743-2.243087 13.130042-8.242731 17.286712-13.294794 9.212826-25.922393 19.730367-40.148395 27.185152-30.444383 15.95232-61.732993 30.297027-91.821265 44.88835C568.329425 459.151351 602.155834 467.410456 635.544269 478.401788z" p-id="18268" fill="#f44808"></path><path d="M673.563164 811.088866c-12.976546-3.01159-26.302039-4.510734-40.022529-6.780427 0.694825-2.615571 1.196245-4.867868 1.888-7.060813 10.070356-31.897478 11.874445-64.206324 7.691169-97.453542-13.919011-110.61019-125.914758-176.923502-215.691457-157.747767-47.78226 10.205433-81.620949 36.890188-101.228519 81.56876 71.884191-71.190389 179.466418-49.432853 223.887117 12.062733 29.315676 40.581254 37.269835 85.23322 22.286586 133.007293-15.030321 47.921429-49.582255 77.453023-97.616248 95.934956 61.796438 1.750877 233.275951-3.621481 254.119675-10.259668-2.342348-4.469801-4.089132-9.146311-6.938016-13.010315C709.838346 824.957735 692.984493 815.59346 673.563164 811.088866z" p-id="18269" fill="#f44808"></path><path d="M534.685163 725.447347c-0.433882-56.465013-42.902112-102.863762-102.437044-103.161544-64.24214-0.324388-103.433744 52.433186-103.439884 102.995769-0.00614 54.04387 44.74918 103.402021 102.848413 102.490256C488.697783 827.724755 535.121092 782.037203 534.685163 725.447347zM431.128623 772.184811c-26.053376-0.092098-46.77328-21.143553-46.654576-47.393403 0.113587-25.645077 22.200628-47.642067 47.403636-47.214325 25.605168 0.431835 47.329958 22.166859 47.504944 47.521317C479.561705 751.020792 457.772446 772.282025 431.128623 772.184811z" p-id="18270" fill="#f44808"></path><path d="M863.073332 624.677269c-5.123694-20.192901-19.295462-31.397081-38.401612-36.170804-13.314237-3.325745-27.16878-4.612041-40.83708-6.376221-37.299511-4.811586-70.12615-20.315698-101.579513-40.246633-63.176878-40.032762-132.093481-57.691957-206.838835-48.972365-12.923334 1.50733-25.443485 6.463202-38.149878 9.827833 0.225127 0.895393 0.448208 1.786693 0.671289 2.681062 8.211009 0 16.518209-0.797156 24.616654 0.158612 19.765159 2.331092 40.018436 3.377934 59.039651 8.670473 67.429739 18.757203 115.761514 62.206784 150.210094 121.894188 4.919033 8.525164 10.476609 14.224979 19.98824 14.746866 13.645788 0.74599 27.538193 2.113127 40.957831 0.376577 11.717879-1.51654 23.611767-5.593392 34.234709-10.9197 30.68793-15.395642 61.841463-22.267143 95.451956-9.4093 0.747014-1.765203 1.174756-2.301416 1.152243-2.819209C863.542007 626.968451 863.355765 625.800859 863.073332 624.677269z" p-id="18271" fill="#f44808"></path></svg>';
    } else if (preg_match('/Opera[\s|\/]([^\s]+)/i', $agent, $regs)) {
        $outputer = '<svg t="1625554335052" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2886" width="16" height="16"><path d="M533.504 0C254.506667 0 42.666667 194.005333 42.666667 507.136 42.666667 777.642667 238.933333 1024 533.333333 1024 827.818667 1024 1024 777.642667 1024 507.136 1024 194.389333 812.458667 0 533.504 0z m0 85.333333C692.906667 85.333333 725.333333 294.528 725.333333 484.48 725.333333 660.437333 707.285333 896 535.424 896S341.333333 658.133333 341.333333 482.176C341.333333 292.266667 374.016 85.333333 533.461333 85.333333z" fill="#D00003" p-id="2887"></path></svg>';
    } else if (preg_match('/Chrome([\d]*)\/([^\s]+)/i', $agent, $regs)) {
        $str1 = explode('Chrome/', $agent);
        $chrome_vern = explode('.', $str1[1]);
        $outputer = '<svg t="1625553903350" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3860" width="16" height="16"><path d="M123.648 178.346667C361.642667-98.602667 802.986667-43.946667 967.936 279.68h-396.501333c-71.424 0-117.546667-1.621333-167.509334 24.661333-58.709333 30.933333-102.997333 88.234667-118.485333 155.52L123.648 178.389333z" fill="#EA4335" p-id="3861"></path><path d="M341.674667 512c0 93.866667 76.330667 170.24 170.154666 170.24 93.866667 0 170.154667-76.373333 170.154667-170.24s-76.330667-170.24-170.154667-170.24c-93.866667 0-170.154667 76.373333-170.154666 170.24z" fill="#4285F4" p-id="3862"></path><path d="M577.877333 734.848c-95.530667 28.373333-207.274667-3.114667-268.501333-108.8-46.762667-80.64-170.24-295.765333-226.346667-393.557333-196.565333 301.226667-27.136 711.808 329.685334 781.866666l165.12-279.509333z" fill="#34A853" p-id="3863"></path><path d="M669.866667 341.76a233.130667 233.130667 0 0 1 43.008 286.634667c-40.576 69.973333-170.154667 288.682667-232.96 394.581333 367.658667 22.656 635.733333-337.664 514.645333-681.258667H669.866667z" fill="#FBBC05" p-id="3864"></path></svg>';
    } else if (preg_match('/safari\/([^\s]+)/i', $agent, $regs)) {
        $str1 = explode('Version/',  $agent);
        $safari_vern = explode('.', $str1[1]);
        $outputer = '<svg t="1625554712510" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="12832" width="16" height="16"><path d="M1011.756522 505.878261a505.856 505.856 0 1 1-1011.712-0.022261 505.856 505.856 0 0 1 1011.712 0.022261z" fill="#F0F0F0" p-id="12833"></path><path d="M972.109913 505.878261a466.231652 466.231652 0 1 1-932.485565 0 466.231652 466.231652 0 0 1 932.485565 0z" fill="#107DDD" p-id="12834"></path><path d="M499.088696 70.745043a6.789565 6.789565 0 1 1 13.601391 0v78.425044a6.789565 6.789565 0 0 1-13.601391 0V70.745043zM460.04313 66.782609a6.789565 6.789565 0 0 1 7.457392 6.054956l3.428174 32.790261a6.789565 6.789565 0 0 1-6.054957 7.457391 6.789565 6.789565 0 0 1-7.479652-6.054956l-3.405913-32.790261A6.745043 6.745043 0 0 1 460.04313 66.782609z m90.624 0.022261a6.789565 6.789565 0 0 0-6.099478 6.054956l-3.450435 32.790261a6.811826 6.811826 0 1 0 13.534609 1.424696l3.450435-32.790261a6.811826 6.811826 0 0 0-7.435131-7.479652z m-136.303304 6.722782a6.767304 6.767304 0 0 1 8.058435 5.253565l16.228174 76.710957a6.789565 6.789565 0 1 1-13.289739 2.804869l-16.250435-76.710956a6.789565 6.789565 0 0 1 5.253565-8.058435z m181.982609-0.066782a6.789565 6.789565 0 0 0-6.700522 5.38713l-16.294956 76.688696a6.789565 6.789565 0 1 0 13.312 2.82713l16.294956-76.688696a6.811826 6.811826 0 0 0-6.611478-8.21426z m-226.882783 12.532869a6.745043 6.745043 0 0 1 8.548174 4.363131l10.195478 31.365565a6.789565 6.789565 0 1 1-12.933565 4.207304L365.078261 94.564174a6.789565 6.789565 0 0 1 4.385391-8.570435z m270.224696-0.289391a6.767304 6.767304 0 0 0-5.87687 4.674782l-10.195478 31.365566a6.789565 6.789565 0 1 0 12.933565 4.207304l10.195478-31.365565a6.789565 6.789565 0 0 0-7.056695-8.882087z m-313.299478 16.339478a6.722783 6.722783 0 0 1 8.97113 3.450435l31.855304 71.657739a6.811826 6.811826 0 0 1-12.421565 5.520696l-31.855304-71.657739a6.789565 6.789565 0 0 1 3.450435-8.971131z m356.908521-0.333913a6.767304 6.767304 0 0 0-6.344348 4.029217l-31.944347 71.590957a6.811826 6.811826 0 1 0 12.421565 5.542956l31.944348-71.590956a6.789565 6.789565 0 0 0-6.077218-9.572174z m-398.157913 21.815652a6.811826 6.811826 0 0 1 9.282783 2.493218l16.495304 28.560695a6.767304 6.767304 0 0 1-2.493217 9.282783 6.789565 6.789565 0 0 1-9.282783-2.470957l-16.495304-28.582956a6.789565 6.789565 0 0 1 2.493217-9.282783z m437.626435-0.890435a6.722783 6.722783 0 0 0-5.409391 3.383653l-16.495305 28.560695a6.767304 6.767304 0 0 0 2.493218 9.282783 6.789565 6.789565 0 0 0 9.282782-2.470957l16.473044-28.582956a6.789565 6.789565 0 0 0-6.344348-10.173218z m-476.382609 25.533218a6.90087 6.90087 0 0 1 3.762087-1.291131 6.722783 6.722783 0 0 1 5.743305 2.80487l46.035478 63.465739c2.226087 3.049739 1.536 7.279304-1.513739 9.483131a6.767304 6.767304 0 0 1-9.483131-1.51374l-46.035478-63.465739a6.767304 6.767304 0 0 1 1.491478-9.48313z m515.717566-0.957218a6.745043 6.745043 0 0 0-5.743305 2.80487l-46.124522 63.398957a6.811826 6.811826 0 0 0 10.99687 7.991652l46.124522-63.398957a6.745043 6.745043 0 0 0-1.491478-9.48313 6.633739 6.633739 0 0 0-3.762087-1.313392zM210.521043 177.730783a6.745043 6.745043 0 0 1 9.594435 0.512l22.060522 24.509217a6.767304 6.767304 0 0 1-0.489739 9.594435 6.789565 6.789565 0 0 1-9.616696-0.489739l-22.060522-24.509218a6.811826 6.811826 0 0 1 0.512-9.616695z m585.883827-1.691826a6.834087 6.834087 0 0 0-4.697044 2.248347l-22.082783 24.509218a6.767304 6.767304 0 0 0 0.512 9.594435 6.745043 6.745043 0 0 0 9.594435-0.48974l22.082783-24.509217a6.767304 6.767304 0 0 0-0.512-9.594435 6.745043 6.745043 0 0 0-4.897391-1.758608zM177.441391 210.209391a6.90087 6.90087 0 0 1 4.697044-2.248348v0.022261a6.633739 6.633739 0 0 1 4.897391 1.736348l58.278957 52.446609a6.789565 6.789565 0 1 1-9.104696 10.106435L177.953391 219.826087a6.811826 6.811826 0 0 1-0.512-9.616696z m652.399305-2.003478a6.633739 6.633739 0 0 0-4.897392 1.736348l-58.301217 52.424348a6.811826 6.811826 0 0 0 9.082435 10.106434l58.301217-52.424347a6.767304 6.767304 0 0 0-4.185043-11.842783zM148.72487 246.361043a6.811826 6.811826 0 0 1 5.721043-2.804869 6.989913 6.989913 0 0 1 3.762087 1.313391l26.690783 19.389218a6.745043 6.745043 0 0 1 1.491478 9.48313 6.767304 6.767304 0 0 1-9.483131 1.513739l-26.690782-19.389217a6.767304 6.767304 0 0 1-1.491478-9.505392z m708.786087-2.537739a6.789565 6.789565 0 0 0-3.762087 1.291131l-26.690783 19.366956a6.789565 6.789565 0 1 0 7.969391 10.99687l26.690783-19.366957a6.745043 6.745043 0 0 0 1.513739-9.48313 6.678261 6.678261 0 0 0-5.721043-2.80487zM123.169391 284.91687a6.745043 6.745043 0 0 1 9.282783-2.470957L200.347826 321.647304a6.789565 6.789565 0 1 1-6.789565 11.776l-67.895652-39.223652a6.767304 6.767304 0 0 1-2.493218-9.282782z m760.008348-3.383653a6.789565 6.789565 0 0 0-3.873391 0.912696l-67.895652 39.201391a6.789565 6.789565 0 1 0 6.789565 11.776l67.917913-39.223652a6.789565 6.789565 0 0 0-2.938435-12.666435zM102.689391 326.032696a6.722783 6.722783 0 0 1 8.971131-3.428174l30.118956 13.423304a6.811826 6.811826 0 0 1-5.542956 12.421565l-30.118957-13.445565a6.767304 6.767304 0 0 1-3.428174-8.97113z m800.189218-3.739826c-0.890435 0-1.78087 0.200348-2.649044 0.578782l-30.118956 13.423305c-3.450435 1.536-4.986435 5.520696-3.450435 8.97113a6.767304 6.767304 0 0 0 8.97113 3.450435l30.141218-13.423305a6.811826 6.811826 0 0 0-2.893913-13.000347zM85.704348 368.973913a6.767304 6.767304 0 0 1 8.570435-4.36313l74.551652 24.308869a6.789565 6.789565 0 1 1-4.207305 12.911305L90.067478 377.544348a6.789565 6.789565 0 0 1-4.36313-8.570435z m834.582261-4.385391a6.989913 6.989913 0 0 0-2.693566 0.311652l-74.573913 24.242087a6.811826 6.811826 0 0 0 4.207305 12.933565l74.573913-24.242087a6.789565 6.789565 0 0 0-1.513739-13.245217zM74.039652 414.096696a6.789565 6.789565 0 0 1 6.700522-5.387131c0.445217 0 0.912696 0.044522 1.357913 0.155826l32.256 6.856348a6.767304 6.767304 0 1 1-2.82713 13.289739l-32.256-6.856348a6.789565 6.789565 0 0 1-5.231305-8.058434z m857.021218-5.320348a9.97287 9.97287 0 0 0-1.380174 0.133565l-32.256 6.856348a6.767304 6.767304 0 0 0-5.231305 8.058435 6.767304 6.767304 0 0 0 8.058435 5.253565l32.256-6.856348a6.767304 6.767304 0 0 0 5.231304-8.058435 6.745043 6.745043 0 0 0-6.67826-5.38713zM66.404174 459.419826a6.834087 6.834087 0 0 1 7.479652-6.032696l77.979826 8.236522a6.767304 6.767304 0 0 1 6.032696 7.479652 6.745043 6.745043 0 0 1-7.457391 6.032696l-77.979827-8.236522a6.811826 6.811826 0 0 1-6.054956-7.479652z m872.937739-5.453913a4.786087 4.786087 0 0 0-1.380174 0l-78.002087 8.125217a6.811826 6.811826 0 0 0 1.424696 13.534609L939.364174 467.478261a6.789565 6.789565 0 0 0-0.022261-13.512348zM64.400696 505.878261c0-3.762087 3.027478-6.789565 6.789565-6.789565h32.968348c3.784348 0 6.811826 3.027478 6.811826 6.789565 0 3.784348-3.027478 6.811826-6.811826 6.811826H71.190261a6.789565 6.789565 0 0 1-6.789565-6.811826z m843.197217-6.789565a6.767304 6.767304 0 0 0-6.789565 6.789565c0 3.784348 3.027478 6.811826 6.789565 6.811826h32.990609a6.789565 6.789565 0 0 0 6.789565-6.811826 6.767304 6.767304 0 0 0-6.789565-6.789565h-32.990609zM150.394435 536.153043a6.767304 6.767304 0 0 1 7.457391 6.054957 6.767304 6.767304 0 0 1-6.054956 7.457391l-77.979827 8.147479a6.767304 6.767304 0 0 1-7.457391-6.054957 6.745043 6.745043 0 0 1 6.054957-7.457391l77.979826-8.147479z m709.565217 0.467479a6.811826 6.811826 0 0 0-0.044522 13.534608l77.957566 8.236522a6.767304 6.767304 0 0 0 7.479652-6.032695 6.767304 6.767304 0 0 0-6.032696-7.479653l-77.979826-8.236521a5.743304 5.743304 0 0 0-1.380174-0.022261zM111.526957 582.700522a6.767304 6.767304 0 0 1 8.058434 5.231304 6.789565 6.789565 0 0 1-5.231304 8.058435l-32.256 6.856348a6.767304 6.767304 0 1 1-2.82713-13.289739l32.256-6.856348z m787.344695-0.089044a6.789565 6.789565 0 0 0-1.469217 13.445565l32.278261 6.856348a6.789565 6.789565 0 1 0 2.804869-13.289739l-32.256-6.856348a5.654261 5.654261 0 0 0-1.357913-0.155826zM164.530087 609.702957a6.745043 6.745043 0 0 1 8.570435 4.36313 6.767304 6.767304 0 0 1-4.363131 8.570435l-74.551652 24.242087a6.811826 6.811826 0 0 1-4.207304-12.933566l74.551652-24.242086z m679.936-0.066783a6.789565 6.789565 0 0 0-1.513739 13.222956l74.551652 24.30887a6.811826 6.811826 0 0 0 4.207304-12.933565L847.159652 609.947826a6.589217 6.589217 0 0 0-2.693565-0.311652z m-708.34087 53.426087a6.722783 6.722783 0 0 1 8.971131 3.450435 6.767304 6.767304 0 0 1-3.428174 8.97113l-30.141217 13.423304a6.789565 6.789565 0 1 1-5.520696-12.421565l30.118956-13.423304z m736.768-0.333913a6.789565 6.789565 0 0 0-2.893913 13.022609l30.118957 13.423304a6.789565 6.789565 0 1 0 5.520696-12.421565l-30.118957-13.423305a6.834087 6.834087 0 0 0-2.626783-0.601043z m-679.334956 15.62713a6.811826 6.811826 0 0 1 6.789565 11.776l-67.895652 39.201392a6.789565 6.789565 0 1 1-6.789565-11.75374l67.895652-39.223652z m620.788869-0.890435a6.789565 6.789565 0 0 0-2.938434 12.666435l67.895652 39.201392a6.811826 6.811826 0 1 0 6.811826-11.75374l-67.917913-39.223652a6.834087 6.834087 0 0 0-3.851131-0.890435zM176.729043 736.300522a6.811826 6.811826 0 0 1 7.991653 10.996869l-26.690783 19.366957a6.789565 6.789565 0 1 1-7.991652-10.99687l26.690782-19.366956z m654.380522-1.068522a6.767304 6.767304 0 0 0-4.229565 12.288l26.690783 19.389217a6.789565 6.789565 0 1 0 7.991652-10.996869l-26.690783-19.389218a6.789565 6.789565 0 0 0-3.762087-1.29113z m-595.055304 4.073739a6.811826 6.811826 0 0 1 9.594435 0.512 6.767304 6.767304 0 0 1-0.512 9.594435L186.835478 801.836522a6.767304 6.767304 0 0 1-9.594435-0.512 6.767304 6.767304 0 0 1 0.48974-9.594435l58.323478-52.424348z m534.594782-1.536a6.811826 6.811826 0 0 0-4.185043 11.842783l58.256696 52.446608a6.811826 6.811826 0 0 0 9.104695-10.106434l-58.278956-52.446609a6.633739 6.633739 0 0 0-4.897392-1.736348z m-480.122434 52.580174a6.878609 6.878609 0 0 1 5.743304-2.80487 6.767304 6.767304 0 0 1 5.253565 10.818783l-46.124521 63.398957a6.811826 6.811826 0 1 1-10.99687-8.013913l46.124522-63.398957z m424.581565-2.515478a6.767304 6.767304 0 0 0-3.762087 1.313391 6.767304 6.767304 0 0 0-1.513739 9.483131l46.057739 63.465739a6.811826 6.811826 0 0 0 10.99687-7.991653l-46.035479-63.465739a6.834087 6.834087 0 0 0-5.743304-2.804869z m-483.083131 12.04313a6.878609 6.878609 0 0 1 4.697044-2.248348 6.811826 6.811826 0 0 1 5.409391 11.353044l-22.060521 24.509217a6.767304 6.767304 0 0 1-9.594435 0.489739 6.767304 6.767304 0 0 1-0.512-9.594434l22.060521-24.509218z m542.96487-2.203826a6.767304 6.767304 0 0 0-5.409391 11.330783l22.082782 24.509217a6.767304 6.767304 0 1 0 10.084174-9.082435l-22.060521-24.509217a6.745043 6.745043 0 0 0-4.697044-2.248348z m-420.641391 31.209739a6.767304 6.767304 0 0 1 8.97113-3.428174 6.767304 6.767304 0 0 1 3.450435 8.971131l-31.944348 71.613217a6.811826 6.811826 0 0 1-12.421565-5.542956l31.944348-71.613218z m296.314435-3.828869a6.767304 6.767304 0 0 0-6.099479 9.549913l31.833044 71.657739a6.811826 6.811826 0 0 0 12.443826-5.520696l-31.855305-71.657739a6.745043 6.745043 0 0 0-6.322086-4.029217z m-351.521392 25.332869a6.700522 6.700522 0 0 1 5.409392-3.383652 6.789565 6.789565 0 0 1 6.366608 10.173217l-16.495304 28.560696a6.789565 6.789565 0 1 1-11.776-6.789565l16.495304-28.560696z m408.086261-3.383652a6.767304 6.767304 0 0 0-6.366609 10.173217l16.495305 28.560696a6.789565 6.789565 0 1 0 11.753739-6.789565l-16.473044-28.560696a6.722783 6.722783 0 0 0-5.409391-3.383652z m-282.112 6.38887a6.767304 6.767304 0 0 1 6.678261-5.36487 6.789565 6.789565 0 0 1 6.611478 8.192l-16.294956 76.710957a6.789565 6.789565 0 1 1-13.289739-2.827131l16.294956-76.710956z m154.601739-5.320348a6.789565 6.789565 0 0 0-6.611478 8.192l16.250435 76.710956a6.789565 6.789565 0 1 0 13.289739-2.82713l-16.228174-76.688696a6.789565 6.789565 0 0 0-6.700522-5.38713z m-80.628869 14.536348a6.789565 6.789565 0 1 1 13.601391 0v78.402782a6.789565 6.789565 0 0 1-13.601391 0V862.608696z m-117.982609 18.521043a6.789565 6.789565 0 0 0-5.87687 4.674783l-10.195478 31.387826a6.767304 6.767304 0 0 0 4.363131 8.548174 6.767304 6.767304 0 0 0 8.570434-4.363131l10.195479-31.365565a6.811826 6.811826 0 0 0-7.056696-8.882087z m246.828522 0.333913a6.789565 6.789565 0 0 1 8.548174 4.363131l10.195478 31.365565a6.789565 6.789565 0 1 1-12.933565 4.207304l-10.195479-31.365565a6.789565 6.789565 0 0 1 4.385392-8.570435z m-164.708174 17.163131a6.789565 6.789565 0 0 0-6.099478 6.054956l-3.450435 32.790261a6.767304 6.767304 0 0 0 6.054956 7.479652 6.767304 6.767304 0 0 0 7.457392-6.054956l3.450434-32.790261a6.789565 6.789565 0 0 0-7.412869-7.479652z m83.678608 0.044521a6.789565 6.789565 0 0 1 7.457392 6.054957l3.428174 32.790261a6.811826 6.811826 0 1 1-13.512348 1.424695l-3.428174-32.812521a6.745043 6.745043 0 0 1 6.054956-7.457392z" fill="#F4F2F3" p-id="12835"></path><path d="M824.475826 233.984l-371.890087 216.086261L217.444174 820.246261l343.997217-254.797913z" fill="#000000" opacity=".409" p-id="12836"></path><path d="M559.170783 561.686261l-106.585044-111.616L830.73113 195.673043z" fill="#FF5150" p-id="12837"></path><path d="M559.170783 561.686261l-106.607305-111.638261L181.025391 816.083478z" fill="#F1F1F1" p-id="12838"></path><path d="M181.025391 816.083478l378.145392-254.397217L830.73113 195.673043z" fill="#000000" opacity=".243" p-id="12839"></path></svg>';
    } else {
        $outputer = '<svg t="1625553903350" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3860" width="16" height="16"><path d="M123.648 178.346667C361.642667-98.602667 802.986667-43.946667 967.936 279.68h-396.501333c-71.424 0-117.546667-1.621333-167.509334 24.661333-58.709333 30.933333-102.997333 88.234667-118.485333 155.52L123.648 178.389333z" fill="#EA4335" p-id="3861"></path><path d="M341.674667 512c0 93.866667 76.330667 170.24 170.154666 170.24 93.866667 0 170.154667-76.373333 170.154667-170.24s-76.330667-170.24-170.154667-170.24c-93.866667 0-170.154667 76.373333-170.154666 170.24z" fill="#4285F4" p-id="3862"></path><path d="M577.877333 734.848c-95.530667 28.373333-207.274667-3.114667-268.501333-108.8-46.762667-80.64-170.24-295.765333-226.346667-393.557333-196.565333 301.226667-27.136 711.808 329.685334 781.866666l165.12-279.509333z" fill="#34A853" p-id="3863"></path><path d="M669.866667 341.76a233.130667 233.130667 0 0 1 43.008 286.634667c-40.576 69.973333-170.154667 288.682667-232.96 394.581333 367.658667 22.656 635.733333-337.664 514.645333-681.258667H669.866667z" fill="#FBBC05" p-id="3864"></path></svg>';
    }
    echo $outputer;
}

// 获取操作系统信息
function GetOs($agent)
{
    $os = false;
    if (preg_match('/win/i', $agent)) {
            $os = '<svg t="1625553940870" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1262" width="16" height="16"><path d="M0 139.392L409.429333 81.92l0.170667 407.210667-409.216 2.389333L0 139.392z m409.301333 395.818667L409.6 942.08 0 884.181333V532.48l409.301333 2.730667z m41.258667-454.186667L1024 0v487.125333l-573.44 4.394667V81.024zM1024 533.333333L1023.872 1024l-572.501333-79.274667-0.810667-412.245333 573.44 0.896z" fill="#0078D7" p-id="1263"></path></svg>';

    } else if (preg_match('/android/i', $agent)) {
            $os = '<svg t="1625554242235" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1457" width="16" height="16"><path d="M633.639322 204.310541a20.138113 20.138113 0 0 1-20.052782-20.266109 20.095447 20.095447 0 1 1 40.105563 0c0 11.178359-8.959754 20.266109-20.052781 20.266109z m-243.79063 0a20.138113 20.138113 0 0 1-20.052781-20.266109 20.095447 20.095447 0 1 1 40.105563 0c0 11.178359-8.959754 20.266109-20.052782 20.266109z m252.110401-117.756761c79.9978 39.550912 134.140311 114.471519 134.140311 200.186495H247.900596c0-85.757642 54.185177-160.635583 134.225642-200.186495l-10.623708-16.895536-10.538377-16.639542-23.466021-37.460303A10.41038 10.41038 0 0 1 340.058062 1.734779a9.173081 9.173081 0 0 1 13.140972 2.773257l25.172641 40.105564 10.666373 16.85287 10.666373 17.108863A294.818559 294.818559 0 0 1 512 56.773265c40.105564 0 78.120518 7.807785 112.210248 21.844733l10.794369-17.108863 35.88168-56.958433a8.959754 8.959754 0 0 1 13.012976-2.773258c4.35188 2.986585 5.546514 9.215747 2.64526 13.82362l-23.508686 37.460303-10.538377 16.639543-10.538377 16.895535zM251.953818 327.699148H776.099404v433.566744c0 34.388388-26.708599 62.419617-59.731691 62.419617H673.275565c1.493292 5.20519 2.346602 10.666373 2.346602 16.426215v124.796568c0 32.639102-25.385969 59.091708-56.702441 59.091708-31.231141 0-56.531779-26.452606-56.531778-59.091708V840.111724c0-5.759842 0.767979-11.221025 2.218605-16.426215h-105.127775c1.450627 5.20519 2.303937 10.666373 2.303936 16.426215v124.796568c0 32.639102-25.385969 59.091708-56.617109 59.091708-31.273807 0-56.659775-26.452606-56.659776-59.091708V840.111724c0-5.759842 0.810644-11.221025 2.303937-16.426215h-43.092148c-33.023092 0-59.774356-28.031229-59.774356-62.419617V327.699148h4.053221z m-105.639762 0c33.663074 0 60.926325 26.281944 60.926325 58.707719v251.214425c0 32.425775-27.305916 58.707719-60.926325 58.707719-33.70574 0-60.96899-26.281944-60.96899-58.707719V386.406867c0-32.425775 27.305916-58.707719 61.011656-58.707719z m731.414553 0c33.663074 0 60.926325 26.281944 60.926325 58.707719v251.214425c0 32.425775-27.305916 58.707719-60.926325 58.707719-33.70574 0-61.011656-26.281944-61.011655-58.707719V386.406867c0-32.425775 27.305916-58.707719 61.011655-58.707719z" fill="#A4C639" p-id="1458"></path></svg>';

    } else if (preg_match('/ubuntu/i', $agent)) {
        $os = '<svg t="1625554460394" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10475" width="16" height="16"><path d="M512 0c282.581333 0 512 229.418667 512 512s-229.418667 512-512 512S0 794.581333 0 512 229.418667 0 512 0z m139.904 754.346667a68.352 68.352 0 1 0 68.309333 118.4 68.352 68.352 0 0 0-68.309333-118.4z m-139.904-42.666667a199.04 199.04 0 0 1-84.096-18.56L380.416 778.24c39.68 19.584 84.394667 30.762667 131.584 30.762667a294.826667 294.826667 0 0 0 79.36-10.922667 95.573333 95.573333 0 0 1 46.72-67.712 95.744 95.744 0 0 1 81.92-6.656 295.765333 295.765333 0 0 0 88.32-192.64l-97.493333-1.408A199.637333 199.637333 0 0 1 512 711.68zM312.32 512a199.68 199.68 0 0 1 84.906667-163.413333L347.306667 264.917333a297.344 297.344 0 0 0-122.922667 172.16 94.72 94.72 0 0 1 35.413333 74.24c0 30.037333-13.824 56.277333-35.413333 74.197334a297.386667 297.386667 0 0 0 122.922667 172.117333l49.92-83.84A195.626667 195.626667 0 0 1 312.32 512z m-148.48-68.352a68.352 68.352 0 1 0 0 136.661333 68.352 68.352 0 0 0 0-136.661333zM512 312.32a199.637333 199.637333 0 0 1 198.826667 181.973333l97.493333-1.450666a296.490667 296.490667 0 0 0-88.32-192.682667A95.829333 95.829333 0 0 1 591.36 225.706667 303.957333 303.957333 0 0 0 512 215.04c-47.36 0-91.946667 11.093333-131.584 30.72l47.488 85.12A198.954667 198.954667 0 0 1 512 312.32z m139.904-42.709333a68.394667 68.394667 0 0 0 93.397333-24.96 68.437333 68.437333 0 0 0-118.485333-68.309334 68.266667 68.266667 0 0 0 25.088 93.269334z" p-id="10476" fill="#ed6408"></path></svg>';
    } else if (preg_match('/linux/i', $agent)) {
        $os = '<svg t="1625554508268" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8568" width="16" height="16"><path d="M525.2 198.3c-8.6 5.6-15.2 13.8-18.9 23.4-3.8 12.4-3.2 25.6 1.5 37.7 3.9 12.7 11.7 23.8 22.2 31.8 5.4 3.8 11.6 6.2 18.2 7 6.6 0.8 13.2-0.3 19.1-3.3 7-3.9 12.6-10 15.9-17.3 3.2-7.4 5-15.3 5.2-23.3 0.7-10.2-0.6-20.4-3.8-30.1-3.5-10.6-10.3-19.7-19.5-25.9-4.7-3-9.9-5-15.4-5.8-5.5-0.8-11.1-0.2-16.3 1.8-2.9 1.2-5.7 2.7-8.3 4.5" fill="#FFFFFF" p-id="8569"></path><path d="M810.2 606.5c-5.1-28.3-13.1-56-23.8-82.6-7.3-19.8-17.2-38.6-29.5-55.8-12.4-16.5-28.1-30.4-40.2-47.1-6.4-8.7-11.8-18.4-18.5-26.9-2.7-5.6-5.3-11.2-7.9-16.8-8-17.5-15.3-35.4-24.8-52-1.5-2.6-3.1-5.2-4.6-7.7-1.2-16-2.9-32-3.8-48 0.7-32.1-2-64.3-8.1-95.9-4.2-15.1-10.6-29.6-19-42.8-9.8-15.6-22.4-29.2-37.2-40.1-24.1-17.1-52.9-26.3-82.4-26.4-21.7-0.5-43.2 4.4-62.5 14.4-20.3 11.1-36.7 28.2-47 48.9-9.6 20.9-14.7 43.5-15 66.5-0.8 22.6 1.3 45 2.2 67.6 0.9 23.4 0.4 46.9 2.3 70.3 0.6 7.5 1.5 15 1.5 22.6 0 3.8-0.2 7.6-0.3 11.3l-0.3 0.8c-10.2 17.3-21.5 34-33.8 49.9-8.6 10.9-17.2 21.7-25.9 32.4-11.3 12.7-20.9 26.8-28.5 42-5.1 13.2-9.2 26.8-12.4 40.6l-0.3 1.1c-4.8 15.9-10.8 31.3-18 46.2-0.7 1.4-1.4 2.9-2 4.2-4.3 8.9-8.8 17.8-13.5 26.5l-5.4 10.1c-3.4 6.1-6.4 12.4-9 18.8-1.5 3.9-2.7 7.9-3.4 12-1.3 8.7-0.7 17.5 1.6 25.9 0.5 2.1 1.2 4.2 1.9 6.3 2.2 6.2 4.8 12.3 7.9 18.1 1.4 2.7 2.9 5.3 4.3 8l1.3 1.9c1.4 2.5 2.9 5 4.4 7.4l0.2 0.3c1.7 2.8 3.6 5.5 5.4 8.2l0.3 0.4c1.9 2.6 3.8 5.3 5.8 7.9 7.4 28.9 21 55.8 39.7 79-2.9 5.1-5.5 10.1-8.4 15.1-10.2 14.8-18.6 30.7-25.1 47.4-2.7 8.6-3.4 17.7-1.9 26.6 1.4 9 6 17.1 13 23 4.7 3.6 10.1 6.1 15.8 7.3 5.7 1.2 11.6 1.8 17.5 1.5 22.2-1.7 44.2-6.1 65.4-12.9 12.8-3.4 25.6-6.4 38.6-9 13.5-3.1 27.2-5 41-5.6 3.4 0.1 6.8-0.1 10.1-0.3 9.4 1 18.8 1.4 28.3 1l3.5-0.2c2.4 0.3 4.9 0.4 7.4 0.6 16.6 0.9 33.1 2.6 49.5 5.1 14.4 2.2 28.8 5 43 8.5 21.9 6.6 44.4 11 67.3 12.9 6 0.3 12-0.2 18-1.4 5.9-1.2 11.5-3.8 16.3-7.4 7-5.8 11.6-13.9 13.1-22.9 1.5-8.9 0.8-18-1.9-26.6-6.6-16.7-15.1-32.6-25.5-47.3-3.6-6.1-7-12.4-10.6-18.5 15.5-17.3 29.2-36.3 40.7-56.5 7 0.4 13.9-0.4 20.6-2.6 17.5-5.9 32.7-17.3 43.3-32.5 3.2-4.5 5.7-9.5 7.2-14.8 6.9-10.7 11.6-22.7 13.8-35.3 3.2-20.8 2.7-42.1-1.5-62.7h-0.2z m0 0" fill="#020204" p-id="8570"></path><path d="M425.6 323.2c-3.1 4-5.3 8.7-6.4 13.6-1.1 4.9-1.8 10-1.9 15 0.3 10.1-0.5 20.2-2.5 30.1-3.5 10.3-8.8 19.8-15.6 28.3-11.7 14.7-20.9 31.2-27.2 48.8-3.2 10.9-4.3 22.3-3.1 33.7-12.1 17.9-22.6 36.9-31.3 56.7-13.4 29.9-22 61.8-25.5 94.4-4.3 40.1 1.6 80.6 17 117.8 11.3 26.8 28.5 50.8 50.3 70.1 11.2 9.7 23.5 17.9 36.7 24.4 46.7 22.8 101.4 22.3 147.6-1.4 23.1-13.5 44.2-30.2 62.6-49.5 11.9-10.8 22.5-22.9 31.8-36.1 15.5-26.9 24.6-57.1 26.5-88.1 9.6-53.6 3.7-108.8-16.9-159.2-8.1-16.8-18.8-32.2-31.8-45.6a252.5 252.5 0 0 0-20.2-68c-7.2-15.5-15.9-30.3-22.6-46.2-2.7-6.5-5.1-13.1-8.1-19.4-2.9-6.4-6.9-12.3-11.8-17.3-5.3-4.9-11.6-8.6-18.5-10.7-6.9-2.2-14-3.4-21.2-3.6-14.4-0.7-28.9 1.1-43.1 0.6-11.5-0.5-22.8-2.5-34.3-1.8-5.7 0.3-11.4 1.4-16.7 3.5-5.4 2.1-10.1 5.5-13.8 10m4.6-125.1c-5.4 0.4-10.5 2.7-14.4 6.4-3.9 3.7-6.8 8.4-8.4 13.5-2.7 10.4-3.4 21.3-1.9 32 0.2 9.7 1.9 19.4 5.1 28.6 1.8 4.5 4.4 8.7 7.8 12.2 3.4 3.5 7.7 6.1 12.4 7.3 4.5 1.1 9.2 0.9 13.5-0.5 4.3-1.4 8.3-3.8 11.5-7 4.7-4.8 8.1-10.7 9.8-17.1 1.7-6.4 2.5-13.1 2.3-19.8 0-8.3-1.3-16.6-3.8-24.6s-6.8-15.3-12.6-21.4c-2.8-2.9-6-5.4-9.6-7.2-3.7-1.7-7.7-2.6-11.7-2.4m95 0c-8.6 5.6-15.2 13.8-18.9 23.4-3.8 12.4-3.2 25.6 1.5 37.7 3.9 12.7 11.7 23.8 22.2 31.8 5.4 3.8 11.6 6.2 18.2 7 6.6 0.8 13.2-0.3 19.1-3.3 7-3.9 12.6-10 15.9-17.3 3.2-7.4 5-15.3 5.2-23.3 0.7-10.2-0.6-20.4-3.8-30.1-3.5-10.6-10.3-19.7-19.5-25.9-4.7-3-9.9-5-15.4-5.8-5.5-0.8-11.1-0.2-16.3 1.8-2.9 1.2-5.7 2.7-8.3 4.5" fill="#FFFFFF" p-id="8571"></path><path d="M544.5 223.6c-3.2 0.2-6.2 1.2-8.9 2.9s-5 4-6.8 6.6c-3.4 5.3-5.3 11.5-5.4 17.9-0.3 4.7 0.4 9.5 1.9 14s4.3 8.5 7.9 11.5c3.8 3.1 8.4 4.9 13.3 5.2 4.9 0.2 9.7-1.1 13.7-3.9 3.2-2.3 5.8-5.2 7.6-8.7 1.8-3.4 2.9-7.2 3.4-11 1-6.8-0.2-13.8-3.2-19.9-3.1-6.2-8.4-10.9-14.8-13.4-2.8-1.1-5.7-1.5-8.7-1.4" fill="#020204" p-id="8572"></path><path d="M430.2 198.3c-5.4 0.4-10.5 2.7-14.4 6.4-3.9 3.7-6.8 8.4-8.4 13.5-2.7 10.4-3.4 21.3-1.9 32 0.2 9.7 1.9 19.4 5.1 28.6 1.8 4.6 4.4 8.7 7.8 12.2 3.4 3.5 7.7 6.1 12.4 7.3 4.5 1.1 9.2 0.9 13.5-0.5 4.3-1.4 8.3-3.8 11.5-7 4.7-4.8 8.1-10.7 9.8-17.1 1.7-6.4 2.5-13.1 2.3-19.8 0-8.3-1.3-16.6-3.8-24.6s-6.8-15.3-12.6-21.4c-2.8-2.9-6-5.4-9.6-7.2-3.7-1.7-7.7-2.6-11.7-2.4" fill="#FFFFFF" p-id="8573"></path><path d="M417.3 242.8c-1.3 6.7-1 13.7 1.1 20.2 1.6 4.3 4 8.2 7.2 11.5 2 2.2 4.3 4.1 7 5.4 2.7 1.4 5.7 1.8 8.7 1.1 2.7-0.7 5-2.3 6.7-4.5 1.7-2.2 2.9-4.7 3.7-7.3 2.3-7.8 2.1-16.1-0.4-23.9-1.6-5.7-4.7-10.9-9.1-14.8-2.1-1.8-4.7-3.2-7.4-3.9-2.8-0.7-5.7-0.5-8.4 0.7-2.8 1.4-5.1 3.7-6.5 6.5-1.4 2.8-2.3 5.8-2.7 8.9" fill="#020204" p-id="8574"></path><path d="M404.6 326.9c0.2 0.9 0.5 1.8 1 2.5 0.9 1.4 2 2.5 3.4 3.4 1.3 0.9 2.6 1.7 3.9 2.5 6.9 4.7 13 10.5 17.9 17.3 6 9.4 13.5 17.8 22 25 6.5 4.5 14.1 7.2 22 7.9 9.2 0.7 18.5-0.4 27.4-3.2 8.2-2.4 16.1-5.8 23.5-10.3 12.7-10.2 26.3-19.2 40.7-26.7 3.4-1.2 6.8-2.1 10-3.6 3.3-1.4 6.1-3.8 7.8-7 1.1-3.2 1.8-6.6 1.9-10 0.5-3.6 1.7-7.1 2.3-10.7 0.8-3.6 0.5-7.3-0.8-10.8-1.4-2.7-3.6-4.9-6.3-6.3-2.7-1.3-5.7-2.1-8.7-2.2-6.1 0.2-12.1 0.8-18 1.8-8 0.7-16-0.3-24 0-9.9 0.3-19.8 2.5-29.8 2.9-11.4 0.6-22.7-1.2-34.1-1.7-4.9-0.3-9.9-0.1-14.8 0.7-4.9 0.7-9.6 2.5-13.7 5.3-3.8 3-7.3 6.2-10.7 9.6-1.8 1.6-3.8 3-5.9 4.1-2.2 1.1-4.5 1.7-7 1.6-1.2-0.2-2.5-0.2-3.7 0-0.7 0.3-1.4 0.7-1.9 1.2l-1.5 1.8c-1 1.5-1.9 3.1-2.6 4.7" fill="#D99A03" p-id="8575"></path><path d="M429.7 301.7c-4 2.4-7.9 5-11.8 7.7-2.1 1.3-3.8 3-5.1 5.1-0.7 1.6-1 3.3-0.9 5 0.1 1.7 0.1 3.4 0 5.1-0.1 1.1-0.5 2.3-0.5 3.5 0 0.6 0 1.2 0.2 1.7 0.2 0.6 0.4 1.1 0.8 1.5 0.5 0.5 1.2 0.9 2 1.1 0.7 0.2 1.5 0.3 2.3 0.5 3.5 1 6.7 2.9 9.3 5.4 2.7 2.4 5.1 5.2 8 7.5 8 6 17.7 9.1 27.6 9 9.9-0.2 19.7-1.6 29.2-4.1 7.5-1.6 14.9-3.6 22.1-6.1 11.2-4.2 21.5-10.3 30.4-18.2 3.9-3.8 8-7.2 12.4-10.3 4-2.5 8.7-4.2 12.7-6.6 0.4-0.2 0.7-0.5 1.1-0.7 0.3-0.3 0.6-0.6 0.8-1 0.3-0.7 0.3-1.5 0-2.2-0.2-0.7-0.5-1.3-0.9-1.8-0.5-0.6-1.1-1.2-1.7-1.7-4.6-3.4-10.1-5.3-15.8-5.5-5.8-0.4-11.3 0-16.9-1.1-5.2-1.1-10.3-2.6-15.3-4.4-5.3-1.7-10.7-3-16.3-3.9-13-2.1-26.2-1.8-39.1 1-12.1 2.7-23.8 7.3-34.6 13.5" fill="#604405" p-id="8576"></path><path d="M428.4 288.1c-5.8 3.9-11 8.7-15.5 14.1-2.6 3-4.7 6.5-6.1 10.3-0.9 3-1.5 6.1-2 9.2-0.3 1.1-0.5 2.3-0.5 3.5 0 0.6 0.1 1.2 0.3 1.7 0.2 0.6 0.5 1.1 0.9 1.5 0.7 0.7 1.6 1.1 2.6 1.3 0.9 0.2 1.9 0.2 2.9 0.3 4.4 0.7 8.5 2.5 12.1 5.1 3.6 2.5 7 5.4 10.7 7.8 8.4 5 18 7.7 27.8 7.9 9.8 0.2 19.5-0.8 29-2.9 7.6-1.4 15.1-3.5 22.4-6.3 10.9-4.7 21.1-10.8 30.4-18.2 4.3-3.2 8.5-6.6 12.4-10.3 1.3-1.3 2.6-2.6 4-3.8 1.4-1.2 3-2.1 4.7-2.7 2.7-0.7 5.5-0.8 8.3-0.1 2 0.5 4.1 0.7 6.2 0.7 1.1 0 2.1-0.2 3.1-0.5 1-0.4 1.9-1 2.5-1.8 0.9-1.1 1.3-2.4 1.3-3.8s-0.4-2.7-1.1-3.9c-1.5-2.3-3.8-4.1-6.3-5.1-3.5-1.4-7.1-2.5-10.8-3.2-11.3-2.7-22.3-6.7-32.7-11.9-5.2-2.6-10.1-5.4-15.3-8.1-5.2-2.9-10.6-5.4-16.2-7.2-12.9-3.5-26.6-2.9-39.1 1.8-14 4.9-26.5 13.4-36.1 24.7" fill="#F5BD0C" p-id="8577"></path><path d="M493.5 272.2c0.7 2.3 4.3 1.9 6.4 2.9 2.1 1 3.3 2.9 5.3 3.1 2.1 0.2 5-0.7 5.3-2.6 0.4-2.6-3.4-4.2-5.8-5.1-3.2-1.5-6.8-1.6-10-0.2-0.7 0.3-1.4 1.2-1.2 1.9z m-34.4-1.2c-2.7-0.9-7.1 3.8-5.8 6.3 0.4 0.7 1.6 1.5 2.4 1.1 0.8-0.4 2.3-3.1 3.6-4 1-0.8 0.8-3.1-0.2-3.4z m0 0" fill="#CD8907" p-id="8578"></path><path d="M887.7 829.8c-2 5.2-4.9 10-8.5 14.3-8.4 9-18.6 16.2-29.8 21.2-19 8.8-37.5 18.6-55.5 29.3-11.7 7.8-22.6 16.6-32.7 26.4-8.3 8.7-17.2 16.7-26.6 24.2-9.8 7.2-21.1 12.1-33.1 14-14.7 1.9-29.6-0.4-43.1-6.5-9.7-3.7-18.1-10.2-24-18.8-5-9.2-7.3-19.5-6.8-29.9 0.6-18.3 2.8-36.5 6.6-54.5 2.6-15 5.2-30 6.8-45.1 2.8-27.6 3.1-55.3 1-82.9-0.5-4.6-0.5-9.3 0-13.9 0.6-9.4 8.5-16.6 18-16.5 4.3-0.1 8.6 0.3 12.8 1.1 10 1.2 20 2.9 29.8 5.2 6.1 1.6 12.2 3.8 18.3 5.5 10.2 3 21 3.9 31.6 2.9 11.1-2.6 22.4-4.3 33.8-5.3 4.7 0.2 9.4 1 13.8 2.4 4.6 1.3 8.9 3.6 12.4 6.9 2.5 2.7 4.5 5.8 5.8 9.2 1.9 5.1 3.1 10.4 3.5 15.8 0.2 4.8 0.6 9.6 1.2 14.4 1.7 7.7 5.4 14.9 10.6 20.9 5.3 5.8 11 11.2 17.2 16 5.9 5.2 12.1 10 18.6 14.4 3.1 2.1 6.2 4 9.1 6.3 3 2.2 5.5 5 7.4 8.2 2.4 4.4 3.2 9.5 2 14.4" fill="#F5BD0C" p-id="8579"></path><path d="M887.7 829.8c-2 5.2-4.9 10-8.5 14.3-8.4 9-18.6 16.2-29.8 21.2-19 8.8-37.5 18.6-55.5 29.3-11.7 7.8-22.6 16.6-32.7 26.4-8.3 8.7-17.2 16.7-26.6 24.2-9.8 7.2-21.1 12.1-33.1 14-14.7 1.9-29.6-0.4-43.1-6.5-9.7-3.7-18.1-10.2-24-18.8-5-9.2-7.3-19.5-6.8-29.9 0.6-18.3 2.8-36.5 6.6-54.5 2.6-15 5.2-30 6.8-45.1 2.8-27.6 3.1-55.3 1-82.9-0.5-4.6-0.5-9.3 0-13.9 0.6-9.4 8.5-16.6 18-16.5 4.3-0.1 8.6 0.3 12.8 1.1 10 1.2 20 2.9 29.8 5.2 6.1 1.6 12.2 3.8 18.3 5.5 10.2 3 21 3.9 31.6 2.9 11.1-2.6 22.4-4.3 33.8-5.3 4.7 0.2 9.4 1 13.8 2.4 4.6 1.3 8.9 3.6 12.4 6.9 2.5 2.7 4.5 5.8 5.8 9.2 1.9 5.1 3.1 10.4 3.5 15.8 0.2 4.8 0.6 9.6 1.2 14.4 1.7 7.7 5.4 14.9 10.6 20.9 5.3 5.8 11 11.2 17.2 16 5.9 5.2 12.1 10 18.6 14.4 3.1 2.1 6.2 4 9.1 6.3 3 2.2 5.5 5 7.4 8.2 2.4 4.4 3.2 9.5 2 14.4M259.4 676.3c4.9-1.9 10.2-2.4 15.4-1.4 5.2 1 10.1 3.1 14.4 6.1 8.3 6.3 15.5 14.1 21.2 22.8 14.1 19.4 27.6 39.2 39.9 59.8 10 16.7 19.1 33.9 30.6 49.6 7.5 10.2 16 19.7 23.6 29.9 7.9 10 13.9 21.4 17.6 33.5 4.4 16.1 2.6 33.2-4.9 48.1-5.4 10.4-13.5 19.1-23.4 25.1-10 6-21.5 9-33.2 8.7-18.4-2.5-36.2-8.1-52.6-16.6-34.9-13.9-72.8-18.3-108.8-29.1-11.1-3.3-21.9-7.3-33.1-10.3-5-1.2-9.9-2.7-14.7-4.7-4.7-2-8.8-5.4-11.5-9.7-2-3.5-3-7.5-2.9-11.5 0.1-4 0.9-7.9 2.3-11.5 2.7-7.5 7.1-14.2 10-21.6 4.4-12.2 6.1-25.3 5-38.2-0.6-12.9-2.9-25.8-3.6-38.7-0.6-5.8-0.4-11.6 0.6-17.3 1.5-11.4 10.4-20.5 21.9-22.2 5.3-0.9 10.6-1.3 15.9-1 5.3 0.3 10.7 0.3 16 0 5.3-0.3 10.6-1.8 15.3-4.3 4.3-2.6 8.1-6.2 11-10.4 2.9-4.2 5.5-8.5 7.9-13 2.4-4.5 5.1-8.7 8.3-12.7 3-4.1 7.1-7.2 11.8-9.4" fill="#F5BD0C" p-id="8580"></path><path d="M259.4 676.4c4.9-1.9 10.2-2.4 15.4-1.4 5.2 1 10.1 3.1 14.4 6.1 8.3 6.3 15.5 14.1 21.2 22.8 14.1 19.4 27.6 39.2 39.9 59.8 10 16.7 19.1 33.9 30.6 49.6 7.5 10.2 16 19.7 23.6 29.9 7.9 10 13.9 21.4 17.6 33.5 4.4 16.1 2.6 33.2-4.9 48.1-5.4 10.4-13.5 19.1-23.4 25.1-10 6-21.5 9-33.2 8.7-18.4-2.5-36.2-8.1-52.6-16.6-34.9-13.9-72.8-18.3-108.8-29.1-11.1-3.3-21.9-7.3-33.1-10.3-5-1.2-9.9-2.7-14.7-4.7-4.7-2-8.8-5.4-11.5-9.7-2-3.5-3-7.5-2.9-11.5 0.1-4 0.9-7.9 2.3-11.5 2.7-7.5 7.1-14.2 10-21.6 4.4-12.2 6.1-25.3 5-38.2-0.6-12.9-2.9-25.7-3.6-38.7-0.6-5.8-0.4-11.6 0.6-17.3 1.5-11.4 10.4-20.5 21.9-22.2 5.3-0.9 10.6-1.3 15.9-1 5.3 0.3 10.7 0.3 16 0 5.3-0.3 10.6-1.8 15.3-4.3 4.3-2.6 8.1-6.2 11-10.4 2.9-4.2 5.5-8.5 7.9-13 2.4-4.5 5.1-8.7 8.3-12.7 3-4.1 7.1-7.3 11.8-9.4" fill="#F5BD0C" p-id="8581"></path><path d="M267.1 684.8c4.4-1.7 9.3-2 13.9-0.9s8.9 3.2 12.6 6.2c7.1 6.2 13.1 13.6 17.6 21.9 12 19.4 23.7 39 34.6 59 7.9 15.3 16.8 30.1 26.6 44.2 6.8 9.2 14.6 17.6 21.6 26.6 7.3 8.9 12.8 19 16.2 29.9 4 14.3 2.3 29.6-4.5 42.9-5 9.4-12.5 17.3-21.7 22.6-9.2 5.4-19.8 8-30.4 7.5-16.7-2.6-32.9-7.6-48.2-14.9-30.4-11.1-63.5-12.5-94.7-21.2-11.2-3-22.1-7.1-33.4-9.9-5-1.1-10-2.5-14.8-4.3-4.8-1.8-9-5.2-11.8-9.5-1.8-3.4-2.7-7.2-2.5-11 0.2-3.8 1-7.6 2.4-11.2 2.7-7.1 7-13.6 9.7-20.7 3.8-11 5.1-22.6 3.9-34.2-0.8-11.5-2.9-22.9-3.5-34.5-0.4-5.1-0.2-10.3 0.7-15.4 0.9-5.1 3.3-9.8 6.9-13.6 4.2-3.8 9.4-6.3 15-7 5.6-0.7 11.2-0.7 16.7 0 5.6 0.7 11.2 0.9 16.8 0.8 11 0 21-6.4 25.7-16.4 2.3-4.5 4.3-9.2 5.9-13.9 1.7-4.8 4-9.3 6.7-13.6 2.8-4.3 6.8-7.7 11.5-9.7" fill="#F5BD0C" p-id="8582"></path></svg>';
    } else if (preg_match('/iPhone/i', $agent)) {
        $os = '<svg t="1625554579825" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1262" width="16" height="16"><path d="M645.289723 165.758826C677.460161 122.793797 701.865322 62.036894 693.033384 0c-52.607627 3.797306-114.089859 38.61306-149.972271 84.010072-32.682435 41.130375-59.562245 102.313942-49.066319 161.705521 57.514259 1.834654 116.863172-33.834427 151.294929-79.956767zM938.663644 753.402663c-23.295835 52.820959-34.517089 76.415459-64.511543 123.177795-41.855704 65.279538-100.905952 146.644295-174.121433 147.198957-64.980873 0.725328-81.748754-43.30636-169.982796-42.751697-88.234042 0.46933-106.623245 43.605024-171.732117 42.965029-73.130149-0.682662-129.065752-74.026142-170.964122-139.348347-117.11917-182.441374-129.44975-396.626524-57.172928-510.545717 51.327636-80.895427 132.393729-128.212425 208.553189-128.212425 77.482118 0 126.207106 43.519692 190.377318 43.519692 62.292892 0 100.137957-43.647691 189.779989-43.647691 67.839519 0 139.732344 37.802399 190.889315 103.03927-167.678812 94.036667-140.543004 339.069598 28.885128 404.605134z" fill="#0B0B0A" p-id="1263"></path></svg>';
    } else if (preg_match('/mac/i', $agent)) {
        $os = '<svg t="1625554601868" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10760" width="16" height="16"><path d="M557.1 361.3v-7.4l-22.9 1.6c-6.5 0.4-11.4 1.8-14.7 4.1-3.3 2.4-4.9 5.6-4.9 9.8 0 4.1 1.6 7.3 4.9 9.7 3.2 2.4 7.6 3.6 13 3.6 3.5 0 6.7-0.5 9.7-1.6 3-1.1 5.6-2.5 7.8-4.4 2.2-1.9 3.9-4.1 5.2-6.7 1.3-2.7 1.9-5.6 1.9-8.7zM512 64.2C262.1 64.2 64.2 262.1 64.2 512S262.1 959.8 512 959.8 959.8 761.9 959.8 512 761.9 64.2 512 64.2z m86.9 265.4c2.1-5.9 5.1-11 9-15.3 3.9-4.2 8.5-7.5 13.9-9.8s11.5-3.4 18.2-3.4c6 0 11.5 0.9 16.3 2.7 4.9 1.8 9 4.2 12.5 7.3 3.5 3 6.2 6.6 8.3 10.6 2 4.1 3.2 8.4 3.6 12.9h-18c-0.5-2.5-1.3-4.8-2.4-6.9-1.2-2.1-2.7-4-4.6-5.6-1.9-1.6-4.2-2.8-6.7-3.7-2.6-0.9-5.5-1.3-8.7-1.3-3.8 0-7.3 0.8-10.4 2.3-3.1 1.5-5.8 3.7-8 6.5s-3.9 6.2-5.1 10.3c-1.2 4-1.8 8.5-1.8 13.4 0 5.1 0.6 9.7 1.8 13.7 1.2 4 2.9 7.4 5.2 10.2 2.2 2.8 4.9 4.9 8.1 6.4 3.1 1.5 6.6 2.2 10.3 2.2 6.2 0 11.2-1.4 15-4.3 3.9-2.9 6.4-7.1 7.6-12.7h18c-0.5 4.9-1.9 9.4-4.1 13.5-2.2 4.1-5.1 7.5-8.5 10.4-3.5 2.9-7.6 5.1-12.4 6.6-4.7 1.6-10 2.4-15.6 2.4-6.7 0-12.8-1.1-18.3-3.3-5.4-2.2-10.1-5.4-14-9.6-3.9-4.2-6.9-9.2-9-15.2-2.1-6-3.2-12.7-3.2-20.2-0.1-7.5 0.9-14.1 3-20.1z m-255.8-27.2h18v16h0.3c1.1-2.7 2.5-5.1 4.3-7.1 1.8-2.1 3.8-3.9 6.1-5.4 2.3-1.5 4.9-2.6 7.6-3.4 2.8-0.8 5.7-1.2 8.8-1.2 6.6 0 12.2 1.6 16.7 4.7 4.6 3.2 7.8 7.7 9.7 13.6h0.5c1.2-2.8 2.8-5.4 4.8-7.6 2-2.2 4.2-4.2 6.8-5.8 2.5-1.6 5.4-2.8 8.4-3.6 3-0.8 6.2-1.3 9.6-1.3 4.6 0 8.8 0.7 12.6 2.2 3.8 1.5 7 3.6 9.7 6.3 2.7 2.7 4.8 6 6.2 9.8 1.4 3.8 2.2 8.1 2.2 12.8v64.3h-18.8V337c0-6.2-1.6-11-4.8-14.4-3.2-3.4-7.7-5.1-13.6-5.1-2.9 0-5.5 0.5-8 1.5-2.4 1-4.5 2.4-6.2 4.3-1.7 1.8-3.1 4-4.1 6.6-1 2.5-1.5 5.3-1.5 8.4v58.6H400v-61.4c0-2.7-0.4-5.2-1.3-7.4-0.8-2.2-2-4.1-3.6-5.7-1.6-1.6-3.5-2.8-5.7-3.6-2.2-0.8-4.7-1.3-7.5-1.3-2.9 0-5.6 0.5-8.1 1.6s-4.6 2.6-6.3 4.5c-1.8 1.9-3.2 4.2-4.1 6.8-0.9 2.6-2.5 5.4-2.5 8.5v57.9h-17.8v-94.4zM384 754.3c-82.6 0-134.3-57.4-134.3-148.9S301.4 456.3 384 456.3s134.1 57.6 134.1 149.1S466.5 754.3 384 754.3z m152.8-357.7c-3 0.8-6.2 1.2-9.3 1.2-4.7 0-9-0.7-12.9-2-3.9-1.3-7.3-3.2-10.1-5.7-2.8-2.4-5-5.4-6.6-8.8-1.6-3.5-2.4-7.3-2.4-11.5 0-8.3 3.1-14.8 9.3-19.4 6.2-4.7 15.1-7.4 26.8-8.1l25.5-1.5v-7.3c0-5.4-1.7-9.6-5.2-12.4-3.5-2.8-8.3-4.3-14.7-4.3-2.5 0-4.9 0.3-7.1 0.9-2.2 0.6-4.1 1.6-5.8 2.7-1.7 1.2-3.1 2.6-4.2 4.3-1.1 1.6-1.9 3.5-2.3 5.5h-17.7c0.1-4.2 1.1-8 3.1-11.6s4.6-6.6 7.9-9.2 7.3-4.6 11.8-6.1c4.5-1.4 9.5-2.2 14.8-2.2 5.7 0 10.9 0.7 15.6 2.2 4.7 1.5 8.7 3.5 12 6.2 3.3 2.7 5.8 5.9 7.6 9.7 1.8 3.8 2.7 8.1 2.7 12.7v64.8h-18V381h-0.5c-1.3 2.5-3 4.9-5.1 6.9-2.1 2.1-4.4 3.8-6.9 5.3-2.4 1.5-5.2 2.6-8.3 3.4z m118.8 357.7c-63 0-105.8-33-108.7-84.8h41c3.2 29.6 31.8 49.2 71 49.2 37.6 0 64.6-19.6 64.6-46.4 0-23.2-16.4-37.2-54.4-46.8l-37-9.2c-53.2-13.2-77.4-37.4-77.4-77.2 0-49 42.8-83 103.7-83 59.6 0 101.1 34.2 102.7 83.4h-40.6c-2.8-29.6-27-47.8-63-47.8-35.8 0-60.6 18.4-60.6 45 0 21 15.6 33.4 53.6 43l31.2 7.8c59.4 14.4 83.8 37.8 83.8 79.8 0 53.6-42.3 87-109.9 87zM384 493c-56.6 0-91.9 43.4-91.9 112.3 0 68.8 35.4 112.1 91.9 112.1 56.4 0 91.9-43.4 91.9-112.1 0-68.9-35.6-112.3-91.9-112.3z" p-id="10761"></path></svg>';
    } else if (preg_match('/fusion/i', $agent)) {
        $os = '<svg t="1625554242235" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1457" width="16" height="16"><path d="M633.639322 204.310541a20.138113 20.138113 0 0 1-20.052782-20.266109 20.095447 20.095447 0 1 1 40.105563 0c0 11.178359-8.959754 20.266109-20.052781 20.266109z m-243.79063 0a20.138113 20.138113 0 0 1-20.052781-20.266109 20.095447 20.095447 0 1 1 40.105563 0c0 11.178359-8.959754 20.266109-20.052782 20.266109z m252.110401-117.756761c79.9978 39.550912 134.140311 114.471519 134.140311 200.186495H247.900596c0-85.757642 54.185177-160.635583 134.225642-200.186495l-10.623708-16.895536-10.538377-16.639542-23.466021-37.460303A10.41038 10.41038 0 0 1 340.058062 1.734779a9.173081 9.173081 0 0 1 13.140972 2.773257l25.172641 40.105564 10.666373 16.85287 10.666373 17.108863A294.818559 294.818559 0 0 1 512 56.773265c40.105564 0 78.120518 7.807785 112.210248 21.844733l10.794369-17.108863 35.88168-56.958433a8.959754 8.959754 0 0 1 13.012976-2.773258c4.35188 2.986585 5.546514 9.215747 2.64526 13.82362l-23.508686 37.460303-10.538377 16.639543-10.538377 16.895535zM251.953818 327.699148H776.099404v433.566744c0 34.388388-26.708599 62.419617-59.731691 62.419617H673.275565c1.493292 5.20519 2.346602 10.666373 2.346602 16.426215v124.796568c0 32.639102-25.385969 59.091708-56.702441 59.091708-31.231141 0-56.531779-26.452606-56.531778-59.091708V840.111724c0-5.759842 0.767979-11.221025 2.218605-16.426215h-105.127775c1.450627 5.20519 2.303937 10.666373 2.303936 16.426215v124.796568c0 32.639102-25.385969 59.091708-56.617109 59.091708-31.273807 0-56.659775-26.452606-56.659776-59.091708V840.111724c0-5.759842 0.810644-11.221025 2.303937-16.426215h-43.092148c-33.023092 0-59.774356-28.031229-59.774356-62.419617V327.699148h4.053221z m-105.639762 0c33.663074 0 60.926325 26.281944 60.926325 58.707719v251.214425c0 32.425775-27.305916 58.707719-60.926325 58.707719-33.70574 0-60.96899-26.281944-60.96899-58.707719V386.406867c0-32.425775 27.305916-58.707719 61.011656-58.707719z m731.414553 0c33.663074 0 60.926325 26.281944 60.926325 58.707719v251.214425c0 32.425775-27.305916 58.707719-60.926325 58.707719-33.70574 0-61.011656-26.281944-61.011655-58.707719V386.406867c0-32.425775 27.305916-58.707719 61.011655-58.707719z" fill="#A4C639" p-id="1458"></path></svg>';
    } else {
        $os = '<svg t="1625554242235" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1457" width="16" height="16"><path d="M633.639322 204.310541a20.138113 20.138113 0 0 1-20.052782-20.266109 20.095447 20.095447 0 1 1 40.105563 0c0 11.178359-8.959754 20.266109-20.052781 20.266109z m-243.79063 0a20.138113 20.138113 0 0 1-20.052781-20.266109 20.095447 20.095447 0 1 1 40.105563 0c0 11.178359-8.959754 20.266109-20.052782 20.266109z m252.110401-117.756761c79.9978 39.550912 134.140311 114.471519 134.140311 200.186495H247.900596c0-85.757642 54.185177-160.635583 134.225642-200.186495l-10.623708-16.895536-10.538377-16.639542-23.466021-37.460303A10.41038 10.41038 0 0 1 340.058062 1.734779a9.173081 9.173081 0 0 1 13.140972 2.773257l25.172641 40.105564 10.666373 16.85287 10.666373 17.108863A294.818559 294.818559 0 0 1 512 56.773265c40.105564 0 78.120518 7.807785 112.210248 21.844733l10.794369-17.108863 35.88168-56.958433a8.959754 8.959754 0 0 1 13.012976-2.773258c4.35188 2.986585 5.546514 9.215747 2.64526 13.82362l-23.508686 37.460303-10.538377 16.639543-10.538377 16.895535zM251.953818 327.699148H776.099404v433.566744c0 34.388388-26.708599 62.419617-59.731691 62.419617H673.275565c1.493292 5.20519 2.346602 10.666373 2.346602 16.426215v124.796568c0 32.639102-25.385969 59.091708-56.702441 59.091708-31.231141 0-56.531779-26.452606-56.531778-59.091708V840.111724c0-5.759842 0.767979-11.221025 2.218605-16.426215h-105.127775c1.450627 5.20519 2.303937 10.666373 2.303936 16.426215v124.796568c0 32.639102-25.385969 59.091708-56.617109 59.091708-31.273807 0-56.659775-26.452606-56.659776-59.091708V840.111724c0-5.759842 0.810644-11.221025 2.303937-16.426215h-43.092148c-33.023092 0-59.774356-28.031229-59.774356-62.419617V327.699148h4.053221z m-105.639762 0c33.663074 0 60.926325 26.281944 60.926325 58.707719v251.214425c0 32.425775-27.305916 58.707719-60.926325 58.707719-33.70574 0-60.96899-26.281944-60.96899-58.707719V386.406867c0-32.425775 27.305916-58.707719 61.011656-58.707719z m731.414553 0c33.663074 0 60.926325 26.281944 60.926325 58.707719v251.214425c0 32.425775-27.305916 58.707719-60.926325 58.707719-33.70574 0-61.011656-26.281944-61.011655-58.707719V386.406867c0-32.425775 27.305916-58.707719 61.011655-58.707719z" fill="#A4C639" p-id="1458"></path></svg>';
    }
    echo $os;
}



function agreeNum($cid) {
    $db = Typecho_Db::get();
    $prefix = $db->getPrefix();
    
    //  判断点赞数量字段是否存在
    if (!array_key_exists('agree', $db->fetchRow($db->select()->from('table.contents')))) {
        //  在文章表中创建一个字段用来存储点赞数量
        $db->query('ALTER TABLE `' . $prefix . 'contents` ADD `agree` INT(10) NOT NULL DEFAULT 0;');
    }

    //  查询出点赞数量
    $agree = $db->fetchRow($db->select('table.contents.agree')->from('table.contents')->where('cid = ?', $cid));
    //  获取记录点赞的 Cookie
    $AgreeRecording = Typecho_Cookie::get('typechoAgreeRecording');
    //  判断记录点赞的 Cookie 是否存在
    if (empty($AgreeRecording)) {
        //  如果不存在就写入 Cookie
        Typecho_Cookie::set('typechoAgreeRecording', json_encode(array(0)));
    }

    //  返回
    return array(
        //  点赞数量
        'agree' => $agree['agree'],
        //  文章是否点赞过
        'recording' => in_array($cid, json_decode(Typecho_Cookie::get('typechoAgreeRecording')))?true:false
    );
}


function agree($cid) {
    $db = Typecho_Db::get();
    //  根据文章的 `cid` 查询出点赞数量
    $agree = $db->fetchRow($db->select('table.contents.agree')->from('table.contents')->where('cid = ?', $cid));

    //  获取点赞记录的 Cookie
    $agreeRecording = Typecho_Cookie::get('typechoAgreeRecording');
    //  判断 Cookie 是否存在
    if (empty($agreeRecording)) {
        //  如果 cookie 不存在就创建 cookie
        Typecho_Cookie::set('typechoAgreeRecording', json_encode(array($cid)));
    }else {
        //  把 Cookie 的 JSON 字符串转换为 PHP 对象
        $agreeRecording = json_decode($agreeRecording);
        //  判断文章是否点赞过
        if (in_array($cid, $agreeRecording)) {
            //  如果当前文章的 cid 在 cookie 中就返回文章的赞数，不再往下执行
            return $agree['agree'];
        }
        //  添加点赞文章的 cid
        array_push($agreeRecording, $cid);
        //  保存 Cookie
        Typecho_Cookie::set('typechoAgreeRecording', json_encode($agreeRecording));
    }

    //  更新点赞字段，让点赞字段 +1
    $db->query($db->update('table.contents')->rows(array('agree' => (int)$agree['agree'] + 1))->where('cid = ?', $cid));
    //  查询出点赞数量
    $agree = $db->fetchRow($db->select('table.contents.agree')->from('table.contents')->where('cid = ?', $cid));
    //  返回点赞数量
    return $agree['agree'];
}



/**解析表情+图片**/
$emo = false;
function reEmo($comment){
    global $emo;
    if(!$emo){
        $emo = json_decode(file_get_contents(dirname(__FILE__).'/assets/owo/OwO.json'), true);
        
    }

    foreach ($emo as $v){
        if($v['type'] == 'image'){
            foreach ($v['container'] as $vv){
                $comment = str_replace($vv['data'], '<img width="40" height="40" src='.$dir.' '.$vv['icon'] .''.'>', $comment);
            }
        }
    }
    
    $reg='/<img(.*?)src="(.*?)"(.*?)>/s';
    $rp='<a data-fancybox="gallery" href="${2}"><img${1}src="${2}"${3} class="corss-img" title="点击放大图片"></a>';
    $comment=preg_replace($reg,$rp,$comment);
        
    return $comment;
}



                
